Class: Nodectl::Options
- Inherits:
-
Object
- Object
- Nodectl::Options
- Defined in:
- lib/nodectl/options.rb
Overview
Boot options container, keep info about node directory structure etc
Instance Method Summary collapse
- #[](option_name) ⇒ Object
-
#initialize(overrides = {}) ⇒ Options
constructor
A new instance of Options.
- #inspect ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(overrides = {}) ⇒ Options
Returns a new instance of Options.
3 4 5 6 |
# File 'lib/nodectl/options.rb', line 3 def initialize(overrides = {}) @options = .merge(overrides) @options = (@options) end |
Instance Method Details
#[](option_name) ⇒ Object
8 9 10 |
# File 'lib/nodectl/options.rb', line 8 def [](option_name) @options[option_name.to_s] end |
#inspect ⇒ Object
12 13 14 |
# File 'lib/nodectl/options.rb', line 12 def inspect @options.inspect end |
#to_hash ⇒ Object
20 21 22 |
# File 'lib/nodectl/options.rb', line 20 def to_hash @options end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/nodectl/options.rb', line 16 def to_s @options.to_s end |