Class: Funk::Result
- Inherits:
-
Delegator
- Object
- Delegator
- Funk::Result
- Defined in:
- lib/funk/result.rb
Instance Attribute Summary collapse
-
#instruments ⇒ Object
readonly
Returns the value of attribute instruments.
Instance Method Summary collapse
-
#__getobj__ ⇒ Object
delegate all other methods to @result hash.
-
#initialize(instruments) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(instruments) ⇒ Result
Returns a new instance of Result.
7 8 9 10 11 12 |
# File 'lib/funk/result.rb', line 7 def initialize(instruments) @instruments = instruments.each_with_object({}) do |inst, obj| obj[inst.class.name.split("::").last] = inst end @result = {} end |
Instance Attribute Details
#instruments ⇒ Object (readonly)
Returns the value of attribute instruments.
5 6 7 |
# File 'lib/funk/result.rb', line 5 def instruments @instruments end |
Instance Method Details
#__getobj__ ⇒ Object
delegate all other methods to @result hash
15 16 17 |
# File 'lib/funk/result.rb', line 15 def __getobj__ @result end |