Class: Nicovideo::Random
- Inherits:
-
Page
- Object
- Page
- Nicovideo::Random
show all
- Includes:
- Enumerable
- Defined in:
- lib/nicovideo/random.rb
Constant Summary
Constants inherited
from Page
Page::BASE_TITLE1, Page::BASE_TITLE2, Page::BASE_URL, Page::NV_DEBUG_LEVEL
Instance Method Summary
collapse
Methods inherited from Page
#exists?, #html, #title=
Constructor Details
#initialize(agent) ⇒ Random
Returns a new instance of Random.
5
6
7
8
9
|
# File 'lib/nicovideo/random.rb', line 5
def initialize agent
super(agent)
@url = url()
self.register_getter ["videos"]
end
|
Instance Method Details
#each ⇒ Object
11
12
13
|
# File 'lib/nicovideo/random.rb', line 11
def each
self.videos.each {|v| yield v }
end
|
#reload ⇒ Object
23
24
|
# File 'lib/nicovideo/random.rb', line 23
def reload
end
|
#to_a ⇒ Object
19
20
21
|
# File 'lib/nicovideo/random.rb', line 19
def to_a
videos()
end
|
#url ⇒ Object
15
16
17
|
# File 'lib/nicovideo/random.rb', line 15
def url
"#{BASE_URL}/random"
end
|