Permalink
Browse files

[ryan] summaries can now be calculated using different sample classes

  • Loading branch information...
1 parent ad1b6fd commit ca341d91c2ffe3183952744760661424548715cd @ryanmcgarvey ryanmcgarvey committed Jan 17, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/active_metric/subject.rb
@@ -66,7 +66,7 @@ def self.interval_length
raise
end
- def self.calculated_with(sample_type, interval_length)
+ def self.calculated_with(sample_type, interval_length, summary_type = sample_type)
instance_eval %Q|
def self.sample_type
#{sample_type}
@@ -75,6 +75,10 @@ def self.sample_type
def self.interval_length
#{interval_length}
end
+
+ def self.summary_type
+ #{summary_type}
+ end
|
end

0 comments on commit ca341d9

Please sign in to comment.