Class: Yt::Collections::Reports

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/collections/reports.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, of, #where

Methods included from Actions::List

#first!

Constructor Details

This class inherits a constructor from Yt::Collections::Base

Instance Attribute Details

#metric=(value) ⇒ Object (writeonly)

Sets the attribute metric

Parameters:

  • value

    the value to set the attribute metric to.



6
7
8
# File 'lib/yt/collections/reports.rb', line 6

def metric=(value)
  @metric = value
end

Instance Method Details

#within(days_range) ⇒ Object



8
9
10
11
# File 'lib/yt/collections/reports.rb', line 8

def within(days_range)
  @days_range = days_range
  Hash[*flat_map{|daily_value| daily_value}]
end