Class: HackerCurse::ForumPage
- Inherits:
-
Object
- Object
- HackerCurse::ForumPage
- Includes:
- Enumerable
- Defined in:
- lib/hacker/curse/abstractsiteparser.rb
Instance Attribute Summary collapse
-
#articles ⇒ Object
array of article objects.
-
#create_date ⇒ Object
Returns the value of attribute create_date.
-
#next_url ⇒ Object
Returns the value of attribute next_url.
-
#subforum ⇒ Object
Returns the value of attribute subforum.
-
#url ⇒ Object
new newest hot rising etc.
Instance Method Summary collapse
- #each ⇒ Object (also: #each_article)
- #merge_page(page) ⇒ Object
Instance Attribute Details
#articles ⇒ Object
array of article objects
23 24 25 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 23 def articles @articles end |
#create_date ⇒ Object
Returns the value of attribute create_date.
20 21 22 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 20 def create_date @create_date end |
#next_url ⇒ Object
Returns the value of attribute next_url.
19 20 21 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 19 def next_url @next_url end |
#subforum ⇒ Object
Returns the value of attribute subforum.
21 22 23 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 21 def subforum @subforum end |
#url ⇒ Object
new newest hot rising etc
18 19 20 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 18 def url @url end |
Instance Method Details
#each ⇒ Object Also known as: each_article
24 25 26 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 24 def each @articles.each do |e| yield(e) ; end end |
#merge_page(page) ⇒ Object
28 29 30 31 32 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 28 def merge_page page self.next_url = page.next_url self.articles.push(*page.articles) self end |