Class: EacLauncher::Context
- Inherits:
-
Object
- Object
- EacLauncher::Context
- Includes:
- Eac::SimpleCache
- Defined in:
- lib/eac_launcher/context.rb,
lib/eac_launcher/context/settings.rb
Defined Under Namespace
Classes: Settings
Instance Attribute Summary collapse
-
#publish_options ⇒ Object
Returns the value of attribute publish_options.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Class Method Summary collapse
Instance Method Summary collapse
- #cache_root ⇒ Object
-
#initialize(projects_root, settings_file) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(projects_root, settings_file) ⇒ Context
Returns a new instance of Context.
22 23 24 25 26 |
# File 'lib/eac_launcher/context.rb', line 22 def initialize(projects_root, settings_file) @root = ::EacLauncher::Instances::Base.new(projects_root, nil) @settings = ::EacLauncher::Context::Settings.new(settings_file) @publish_options = { new: false, confirm: false, stereotype: nil } end |
Instance Attribute Details
#publish_options ⇒ Object
Returns the value of attribute publish_options.
20 21 22 |
# File 'lib/eac_launcher/context.rb', line 20 def @publish_options end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
19 20 21 |
# File 'lib/eac_launcher/context.rb', line 19 def root @root end |
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
19 20 21 |
# File 'lib/eac_launcher/context.rb', line 19 def settings @settings end |
Class Method Details
.current ⇒ Object
6 7 8 |
# File 'lib/eac_launcher/context.rb', line 6 def current default end |
Instance Method Details
#cache_root ⇒ Object
28 29 30 |
# File 'lib/eac_launcher/context.rb', line 28 def cache_root File.join(ENV['HOME'], '.cache', 'cli-utils', 'dev') end |