Class: Memoir::Downsample
- Inherits:
-
Object
- Object
- Memoir::Downsample
- Defined in:
- lib/memoir/downsample.rb
Instance Attribute Summary collapse
-
#aggregator ⇒ Object
Returns the value of attribute aggregator.
-
#fill_policy ⇒ Object
Returns the value of attribute fill_policy.
-
#time_period ⇒ Object
Returns the value of attribute time_period.
Instance Method Summary collapse
-
#initialize(time_period, aggregator, fill_policy = nil) ⇒ Downsample
constructor
A new instance of Downsample.
- #to_s ⇒ Object
Constructor Details
#initialize(time_period, aggregator, fill_policy = nil) ⇒ Downsample
Returns a new instance of Downsample.
4 5 6 7 8 |
# File 'lib/memoir/downsample.rb', line 4 def initialize(time_period, aggregator, fill_policy = nil) @time_period = time_period @aggregator = aggregator @fill_policy = fill_policy end |
Instance Attribute Details
#aggregator ⇒ Object
Returns the value of attribute aggregator.
2 3 4 |
# File 'lib/memoir/downsample.rb', line 2 def aggregator @aggregator end |
#fill_policy ⇒ Object
Returns the value of attribute fill_policy.
2 3 4 |
# File 'lib/memoir/downsample.rb', line 2 def fill_policy @fill_policy end |
#time_period ⇒ Object
Returns the value of attribute time_period.
2 3 4 |
# File 'lib/memoir/downsample.rb', line 2 def time_period @time_period end |
Instance Method Details
#to_s ⇒ Object
10 11 12 13 14 15 |
# File 'lib/memoir/downsample.rb', line 10 def to_s downsample = "#{time_period}-#{aggregator}" downsample = "#{downsample}-#{fill_policy}" if fill_policy downsample end |