Class: Nicovideo::Ranking
Constant Summary
Constants inherited from Page
Page::BASE_TITLE1, Page::BASE_TITLE2, Page::BASE_URL, Page::NV_DEBUG_LEVEL
Instance Method Summary collapse
-
#initialize(agent, type = 'mylist', span = 'daily', category = 'all', pagenum = nil) ⇒ Ranking
constructor
A new instance of Ranking.
- #to_a ⇒ Object
- #url ⇒ Object
Methods inherited from Page
Constructor Details
#initialize(agent, type = 'mylist', span = 'daily', category = 'all', pagenum = nil) ⇒ Ranking
Returns a new instance of Ranking.
3 4 5 6 7 8 9 10 |
# File 'lib/nicovideo/ranking.rb', line 3 def initialize agent, type='mylist', span='daily', category='all', pagenum=nil super(agent) @type = type @category = category @pagenum = pagenum @url = url() self.register_getter ["videos"] end |
Instance Method Details
#to_a ⇒ Object
20 21 22 |
# File 'lib/nicovideo/ranking.rb', line 20 def to_a videos() end |
#url ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/nicovideo/ranking.rb', line 12 def url url = "#{BASE_URL}/ranking/#{@type}/#{@span}/#{@category}" if @pagenum url += '?page=' + @pagenum.to_s end url end |