X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fmcollective%2Faggregate%2Fresult%2Fbase.rb;fp=lib%2Fmcollective%2Faggregate%2Fresult%2Fbase.rb;h=a04427ba05db6733facac5ec092b1a86bdd74183;hb=b87d2f4e68281062df1913440ca5753ae63314a9;hp=0000000000000000000000000000000000000000;hpb=ab0ea530b8ac956091f17b104ab2311336cfc250;p=packages%2Fprecise%2Fmcollective.git diff --git a/lib/mcollective/aggregate/result/base.rb b/lib/mcollective/aggregate/result/base.rb new file mode 100644 index 0000000..a04427b --- /dev/null +++ b/lib/mcollective/aggregate/result/base.rb @@ -0,0 +1,25 @@ +module MCollective + class Aggregate + module Result + class Base + attr_accessor :result, :aggregate_format, :action + + 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 + + def to_s + raise "'to_s' method not implemented for result class '#{self.class}'" + end + + def result_type + @result[:type] + end + end + end + end +end