lib/cli/mastermind.rb
# Allows utilities wrapping Mastermind to specify masterplans that should be
# automatically loaded.  Masterplans loaded this way are loaded _after_ all
# others and so should only be used to set default values.
#
# Adding a new autoload after configuration has been initialized will
# immediately load the new masterplan.
#
# @param masterplan_path [String] the path to the masterplan to load
# @return [Void]
Allows utilities wrapping Mastermind to specify masterplans that should be
automatically loaded.  Masterplans loaded this way are loaded _after_ all
others and so should only be used to set default values.

Adding a new autoload after configuration has been initialized will
immediately load the new masterplan.
Allows utilities wrapping Mastermind to specify masterplans that should be automatically loaded . Masterplans loaded this way are loaded _after_ all others and so should only be used to set default values . Adding a new autoload after configuration has been initialized will immediately load the new masterplan .
def autoload_masterplan(masterplan_path)
        path = Pathname.new masterplan_path
        raise Error, "`#{masterplan_path}` is not an absolute path" unless path.absolute?
        raise Error, "`#{masterplan_path}` does not exist or is not a file" unless path.file?
        @autoloads ||= []
        @autoloads << masterplan_path
        @config.load_masterplan masterplan_path unless @config.nil?
      end
def autoload_masterplan ( masterplan_path ) path = Pathname . new masterplan_path raise Error , "`#{masterplan_path}` is not an absolute path" unless path . absolute? raise Error , "`#{masterplan_path}` does not exist or is not a file" unless path . file? @autoloads ||= [ ] @autoloads << masterplan_path @config . load_masterplan masterplan_path unless @config . nil? end
Allows utilities wrapping Mastermind to specify masterplans that should be
automatically loaded.
Allows utilities wrapping Mastermind to specify masterplans that should be automatically loaded .
# Don't use configuration method here to avoid loading configuration early
None
Void
masterplan_path
the path to the masterplan to load
the path to the masterplan to load