Class: Informatics::Support::Options
- Inherits:
-
Object
- Object
- Informatics::Support::Options
- Defined in:
- lib/informatics/lib/informatics/support/options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/informatics/lib/informatics/support/options.rb', line 5 def @options end |
Class Method Details
.collect(*options) ⇒ Object
7 8 9 10 11 |
# File 'lib/informatics/lib/informatics/support/options.rb', line 7 def self.collect(*) o = new o. = o end |
Instance Method Details
#first_key ⇒ Object
18 19 20 |
# File 'lib/informatics/lib/informatics/support/options.rb', line 18 def first_key .keys.first end |
#first_value ⇒ Object
22 23 24 |
# File 'lib/informatics/lib/informatics/support/options.rb', line 22 def first_value .values.first end |
#key_is_present?(key) ⇒ Boolean
26 27 28 |
# File 'lib/informatics/lib/informatics/support/options.rb', line 26 def key_is_present?(key) .key? key end |
#value_for(key) ⇒ Object
30 31 32 |
# File 'lib/informatics/lib/informatics/support/options.rb', line 30 def value_for(key) [key] end |