Class: MCollective::Aggregate::Result::Base
- Inherits:
-
Object
- Object
- MCollective::Aggregate::Result::Base
- Defined in:
- lib/mcollective/aggregate/result/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#aggregate_format ⇒ Object
Returns the value of attribute aggregate_format.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(result, aggregate_format, action) ⇒ Base
constructor
A new instance of Base.
- #result_type ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(result, aggregate_format, action) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 12 13 |
# File 'lib/mcollective/aggregate/result/base.rb', line 7 def initialize(result, aggregate_format, action) raise "No aggregate_format defined in ddl or aggregate function" unless aggregate_format @result = result @aggregate_format = aggregate_format @action = action end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
5 6 7 |
# File 'lib/mcollective/aggregate/result/base.rb', line 5 def action @action end |
#aggregate_format ⇒ Object
Returns the value of attribute aggregate_format.
5 6 7 |
# File 'lib/mcollective/aggregate/result/base.rb', line 5 def aggregate_format @aggregate_format end |
#result ⇒ Object
Returns the value of attribute result.
5 6 7 |
# File 'lib/mcollective/aggregate/result/base.rb', line 5 def result @result end |
Instance Method Details
#result_type ⇒ Object
19 20 21 |
# File 'lib/mcollective/aggregate/result/base.rb', line 19 def result_type @result[:type] end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/mcollective/aggregate/result/base.rb', line 15 def to_s raise "'to_s' method not implemented for result class '#{self.class}'" end |