Class: Avm::Launcher::Context
- Inherits:
-
Object
- Object
- Avm::Launcher::Context
- Includes:
- EacRubyUtils::SimpleCache
- Defined in:
- lib/avm/launcher/context.rb,
lib/avm/launcher/context/settings.rb,
lib/avm/launcher/context/instance_manager.rb,
lib/avm/launcher/context/instance_collector.rb,
lib/avm/launcher/context/instance_discovery.rb,
lib/avm/launcher/context/instance_manager/cached_instance.rb,
lib/avm/launcher/context/instance_manager/cached_instances.rb,
lib/avm/launcher/context/instance_discovery/root_instance_paths.rb
Defined Under Namespace
Classes: InstanceCollector, InstanceDiscovery, InstanceManager, Settings
Constant Summary collapse
- CONFIG_PATH_PREFIX =
'launcher'- FS_OBJECT_ID =
'unique'
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#cache_root ⇒ Object
readonly
Returns the value of attribute cache_root.
-
#instance_manager ⇒ Object
Returns the value of attribute instance_manager.
-
#publish_options ⇒ Object
Returns the value of attribute publish_options.
-
#recache ⇒ Object
Returns the value of attribute recache.
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Class Method Summary collapse
Instance Method Summary collapse
- #fs_object_id ⇒ Object
-
#initialize(options = {}) ⇒ Context
constructor
A new instance of Context.
- #instance(name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Context
Returns a new instance of Context.
30 31 32 33 34 35 36 37 |
# File 'lib/avm/launcher/context.rb', line 30 def initialize( = {}) = .with_indifferent_access @settings = ::Avm::Launcher::Context::Settings.new(build_option(:settings_file)) @cache_root = build_option(:cache_root) = { new: false, confirm: false, stereotype: nil } @instance_manager = ::Avm::Launcher::Context::InstanceManager.new(self) @recache = false end |
Class Attribute Details
.current ⇒ Object
15 16 17 |
# File 'lib/avm/launcher/context.rb', line 15 def current @current ||= default end |
Instance Attribute Details
#cache_root ⇒ Object (readonly)
Returns the value of attribute cache_root.
24 25 26 |
# File 'lib/avm/launcher/context.rb', line 24 def cache_root @cache_root end |
#instance_manager ⇒ Object
Returns the value of attribute instance_manager.
25 26 27 |
# File 'lib/avm/launcher/context.rb', line 25 def instance_manager @instance_manager end |
#publish_options ⇒ Object
Returns the value of attribute publish_options.
25 26 27 |
# File 'lib/avm/launcher/context.rb', line 25 def end |
#recache ⇒ Object
Returns the value of attribute recache.
25 26 27 |
# File 'lib/avm/launcher/context.rb', line 25 def recache @recache end |
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
24 25 26 |
# File 'lib/avm/launcher/context.rb', line 24 def settings @settings end |
Class Method Details
.default ⇒ Object
19 20 21 |
# File 'lib/avm/launcher/context.rb', line 19 def default @default ||= Context.new end |
Instance Method Details
#fs_object_id ⇒ Object
39 40 41 |
# File 'lib/avm/launcher/context.rb', line 39 def fs_object_id FS_OBJECT_ID end |
#instance(name) ⇒ Object
43 44 45 |
# File 'lib/avm/launcher/context.rb', line 43 def instance(name) instances.find { |i| i.name == name } end |