Class: HasOptions
- Inherits:
-
Object
- Object
- HasOptions
- Defined in:
- lib/conan/has_options.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options) ⇒ HasOptions
constructor
A new instance of HasOptions.
- #option(key, value) ⇒ Object
Constructor Details
#initialize(options) ⇒ HasOptions
Returns a new instance of HasOptions.
4 5 6 |
# File 'lib/conan/has_options.rb', line 4 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
2 3 4 |
# File 'lib/conan/has_options.rb', line 2 def @options end |
Instance Method Details
#option(key, value) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/conan/has_options.rb', line 8 def option(key, value) if @options[key].nil? @options[key] = [value] else @options[key] << value end end |