Class: Tenma::Ichiba::Options
- Inherits:
-
Object
- Object
- Tenma::Ichiba::Options
- Defined in:
- lib/tenma/ichiba/options.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #create_instance? ⇒ Boolean
- #delete_all_instances? ⇒ Boolean
- #delete_instance? ⇒ Boolean
-
#initialize(opts) ⇒ Options
constructor
A new instance of Options.
- #provision_instance? ⇒ Boolean
- #restart_instance? ⇒ Boolean
Constructor Details
#initialize(opts) ⇒ Options
Returns a new instance of Options.
8 9 10 |
# File 'lib/tenma/ichiba/options.rb', line 8 def initialize(opts) @raw = Hashie::Mash.new(opts.map { |k, v| [k.gsub(/-/, "_"), v] }.to_h) end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
7 8 9 |
# File 'lib/tenma/ichiba/options.rb', line 7 def raw @raw end |
Instance Method Details
#create_instance? ⇒ Boolean
12 13 14 |
# File 'lib/tenma/ichiba/options.rb', line 12 def create_instance? return !!raw.create_instance end |
#delete_all_instances? ⇒ Boolean
20 21 22 |
# File 'lib/tenma/ichiba/options.rb', line 20 def delete_all_instances? return !!raw.delete_all_instances end |
#delete_instance? ⇒ Boolean
16 17 18 |
# File 'lib/tenma/ichiba/options.rb', line 16 def delete_instance? return !!raw.delete_instance end |
#provision_instance? ⇒ Boolean
24 25 26 |
# File 'lib/tenma/ichiba/options.rb', line 24 def provision_instance? return !!raw.provision_instance end |
#restart_instance? ⇒ Boolean
28 29 30 |
# File 'lib/tenma/ichiba/options.rb', line 28 def restart_instance? return !!raw.restart_instance end |