Class: GoogleVideo::TopVideo

Inherits:
Object
  • Object
show all
Defined in:
lib/google-video.rb

Overview

Describes an entry on the “top videos” page.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#movementObject (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_todayObject (readonly)

the entry’s rank today.



221
222
223
# File 'lib/google-video.rb', line 221

def rank_today
  @rank_today
end

#rank_yesterdayObject (readonly)

the entry’s rank yesterday.



224
225
226
# File 'lib/google-video.rb', line 224

def rank_yesterday
  @rank_yesterday
end

#videoObject (readonly)

the entry’s video details as a Video object.



227
228
229
# File 'lib/google-video.rb', line 227

def video
  @video
end