Class: DevboxLauncher::BoxConfig
- Inherits:
-
Object
- Object
- DevboxLauncher::BoxConfig
- Defined in:
- lib/devbox_launcher/models/box_config.rb
Constant Summary collapse
- DEFAULT_IDENTIFY_FILE_PATH =
"~/.ssh/google_compute_engine".freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #identity_file ⇒ Object
-
#initialize(config) ⇒ BoxConfig
constructor
A new instance of BoxConfig.
- #mutagen_config ⇒ Object
- #project ⇒ Object
- #user ⇒ Object
- #zone ⇒ Object
Constructor Details
#initialize(config) ⇒ BoxConfig
Returns a new instance of BoxConfig.
8 9 10 |
# File 'lib/devbox_launcher/models/box_config.rb', line 8 def initialize(config) @config = config.with_indifferent_access end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/devbox_launcher/models/box_config.rb', line 6 def config @config end |
Instance Method Details
#identity_file ⇒ Object
28 29 30 |
# File 'lib/devbox_launcher/models/box_config.rb', line 28 def identity_file config[:identity_file] || DEFAULT_IDENTIFY_FILE_PATH end |
#mutagen_config ⇒ Object
12 13 14 |
# File 'lib/devbox_launcher/models/box_config.rb', line 12 def mutagen_config MutagenConfig.new(config[:mutagen]) end |
#project ⇒ Object
16 17 18 |
# File 'lib/devbox_launcher/models/box_config.rb', line 16 def project config[:project] end |
#user ⇒ Object
24 25 26 |
# File 'lib/devbox_launcher/models/box_config.rb', line 24 def user config[:user] end |
#zone ⇒ Object
20 21 22 |
# File 'lib/devbox_launcher/models/box_config.rb', line 20 def zone config[:zone] end |