Class: Reddit::Link
- Inherits:
-
Object
- Object
- Reddit::Link
- Defined in:
- lib/reddit.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#rank ⇒ Object
Returns the value of attribute rank.
-
#site_id ⇒ Object
Returns the value of attribute site_id.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #author ⇒ Object
-
#initialize(rank, site_id, url, title, date, points = nil, author = nil) ⇒ Link
constructor
A new instance of Link.
- #points ⇒ Object
Constructor Details
#initialize(rank, site_id, url, title, date, points = nil, author = nil) ⇒ Link
Returns a new instance of Link.
88 89 90 91 92 93 94 95 96 |
# File 'lib/reddit.rb', line 88 def initialize(rank, site_id, url, title, date, points=nil, =nil) @rank = rank @site_id = site_id @url = url @title = title @date = date @points = points @author = end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
86 87 88 |
# File 'lib/reddit.rb', line 86 def date @date end |
#rank ⇒ Object
Returns the value of attribute rank.
86 87 88 |
# File 'lib/reddit.rb', line 86 def rank @rank end |
#site_id ⇒ Object
Returns the value of attribute site_id.
86 87 88 |
# File 'lib/reddit.rb', line 86 def site_id @site_id end |
#title ⇒ Object
Returns the value of attribute title.
86 87 88 |
# File 'lib/reddit.rb', line 86 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
86 87 88 |
# File 'lib/reddit.rb', line 86 def url @url end |
Instance Method Details
#author ⇒ Object
98 99 100 |
# File 'lib/reddit.rb', line 98 def @author ||= end |
#points ⇒ Object
102 103 104 |
# File 'lib/reddit.rb', line 102 def points @points ||= parse_points end |