Class: Crags::Item
- Inherits:
-
Object
- Object
- Crags::Item
- Defined in:
- lib/crags/item.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(elem) ⇒ Item
Returns a new instance of Item.
5 6 7 8 9 |
# File 'lib/crags/item.rb', line 5 def initialize(elem) @title = elem.title @url = elem.url @date = elem.date end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/crags/item.rb', line 3 def date @date end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/crags/item.rb', line 3 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/crags/item.rb', line 3 def url @url end |