Class: Yt::Collections::ViewerPercentages
- Defined in:
- lib/yt/collections/viewer_percentages.rb
Instance Method Summary collapse
Methods inherited from Base
Methods included from Actions::List
Constructor Details
This class inherits a constructor from Yt::Collections::Base
Instance Method Details
#all ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/yt/collections/viewer_percentages.rb', line 8 def all Hash.new{|h,k| h[k] = Hash.new{|h,k| h[k] = Hash.new 0.0}}.tap do |hash| each do |item| hash[item.id][item.gender][item.age_range] = item.value end end end |