Class: Playmo::Options
- Includes:
- Singleton
- Defined in:
- lib/playmo/options.rb
Instance Attribute Summary collapse
-
#options_hash ⇒ Object
Returns the value of attribute options_hash.
Instance Method Summary collapse
Instance Attribute Details
#options_hash ⇒ Object
Returns the value of attribute options_hash.
6 7 8 |
# File 'lib/playmo/options.rb', line 6 def @options_hash end |
Instance Method Details
#get(key) ⇒ Object
15 16 17 |
# File 'lib/playmo/options.rb', line 15 def get(key) @options_hash[key.to_sym] end |
#set(key, value) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/playmo/options.rb', line 8 def set(key, value) raise ArgumentError, "Cannot set key as nil!" if key.nil? @options_hash ||= {} @options_hash[key.to_sym] = value end |