Class: Pathtraq::Item
- Inherits:
-
Object
- Object
- Pathtraq::Item
- Defined in:
- lib/pathtraq.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#hits ⇒ Object
readonly
Returns the value of attribute hits.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(data) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(data) ⇒ Item
Returns a new instance of Item.
13 14 15 16 17 18 |
# File 'lib/pathtraq.rb', line 13 def initialize(data) @title = data.title @link = data.link @description = data.description @hits = data.pathtraq_hits.to_i end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/pathtraq.rb', line 10 def description @description end |
#hits ⇒ Object (readonly)
Returns the value of attribute hits.
11 12 13 |
# File 'lib/pathtraq.rb', line 11 def hits @hits end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
9 10 11 |
# File 'lib/pathtraq.rb', line 9 def link @link end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/pathtraq.rb', line 8 def title @title end |