Class: Brainzz::ViewPercentage

Inherits:
VideoStat show all
Defined in:
lib/brainzz/models/view_percentage.rb

Instance Attribute Summary collapse

Attributes inherited from VideoStat

#video_id

Attributes inherited from Stat

#day

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ ViewPercentage

Returns a new instance of ViewPercentage.



5
6
7
8
9
# File 'lib/brainzz/models/view_percentage.rb', line 5

def initialize(hash)
  super

  @percentage = normalize_stat(percentage_data)
end

Instance Attribute Details

#percentageObject

Returns the value of attribute percentage.



3
4
5
# File 'lib/brainzz/models/view_percentage.rb', line 3

def percentage
  @percentage
end