Class: Reducer
Instance Attribute Summary collapse
-
#reduction ⇒ Object
readonly
Returns the value of attribute reduction.
Instance Method Summary collapse
- #call(*a) ⇒ Object
-
#initialize(reduction, &block) ⇒ Reducer
constructor
A new instance of Reducer.
Constructor Details
#initialize(reduction, &block) ⇒ Reducer
Returns a new instance of Reducer.
2 3 4 5 |
# File 'lib/white_gold/abi/reducer.rb', line 2 def initialize reduction, &block @reduction = reduction @block = block end |
Instance Attribute Details
#reduction ⇒ Object (readonly)
Returns the value of attribute reduction.
11 12 13 |
# File 'lib/white_gold/abi/reducer.rb', line 11 def reduction @reduction end |
Instance Method Details
#call(*a) ⇒ Object
7 8 9 |
# File 'lib/white_gold/abi/reducer.rb', line 7 def call *a block.call *a end |