Class: GoogleVideo::TopVideo
- Inherits:
-
Object
- Object
- GoogleVideo::TopVideo
- Defined in:
- lib/google-video.rb
Overview
Describes an entry on the “top videos” page.
Instance Attribute Summary collapse
-
#movement ⇒ Object
readonly
the direction the entry moved from the previous day to today: 0 for no change, 1 for moving up, -1 for moving down.
-
#rank_today ⇒ Object
readonly
the entry’s rank today.
-
#rank_yesterday ⇒ Object
readonly
the entry’s rank yesterday.
-
#video ⇒ Object
readonly
the entry’s video details as a Video object.
Instance Method Summary collapse
-
#initialize(params) ⇒ TopVideo
constructor
Constructs a TopVideo with the supplied hash mapping attribute names to their respective values.
Constructor Details
#initialize(params) ⇒ TopVideo
Constructs a TopVideo with the supplied hash mapping attribute names to their respective values.
231 232 233 |
# File 'lib/google-video.rb', line 231 def initialize (params) params.each { |key, value| instance_variable_set('@' + key.to_s, value) } end |
Instance Attribute Details
#movement ⇒ Object (readonly)
the direction the entry moved from the previous day to today: 0 for no change, 1 for moving up, -1 for moving down.
218 219 220 |
# File 'lib/google-video.rb', line 218 def movement @movement end |
#rank_today ⇒ Object (readonly)
the entry’s rank today.
221 222 223 |
# File 'lib/google-video.rb', line 221 def rank_today @rank_today end |
#rank_yesterday ⇒ Object (readonly)
the entry’s rank yesterday.
224 225 226 |
# File 'lib/google-video.rb', line 224 def rank_yesterday @rank_yesterday end |
#video ⇒ Object (readonly)
the entry’s video details as a Video object.
227 228 229 |
# File 'lib/google-video.rb', line 227 def video @video end |