Class: MatchReduce::Processor::Result
- Inherits:
-
Object
- Object
- MatchReduce::Processor::Result
- Defined in:
- lib/match_reduce/processor/result.rb
Overview
This is the main resulting value object returned, one per aggregator.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(name, records, value) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(name, records, value) ⇒ Result
Returns a new instance of Result.
16 17 18 19 20 21 22 |
# File 'lib/match_reduce/processor/result.rb', line 16 def initialize(name, records, value) @name = name @records = records @value = value freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/match_reduce/processor/result.rb', line 14 def name @name end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
14 15 16 |
# File 'lib/match_reduce/processor/result.rb', line 14 def records @records end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
14 15 16 |
# File 'lib/match_reduce/processor/result.rb', line 14 def value @value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
28 29 30 31 32 33 |
# File 'lib/match_reduce/processor/result.rb', line 28 def ==(other) other.instance_of?(self.class) && name == other.name && records == other.records && value == other.value end |
#hash ⇒ Object
24 25 26 |
# File 'lib/match_reduce/processor/result.rb', line 24 def hash [name, records, value].hash end |