Class: Consummo::SimpleItem
- Inherits:
-
Object
- Object
- Consummo::SimpleItem
- Defined in:
- lib/consummo/simple_item.rb
Instance Method Summary collapse
- #attributes ⇒ Object
- #attributes=(attrs) ⇒ Object
- #content ⇒ Object
- #guid ⇒ Object
-
#initialize(attributes = {}) ⇒ SimpleItem
constructor
A new instance of SimpleItem.
- #title ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ SimpleItem
3 4 5 |
# File 'lib/consummo/simple_item.rb', line 3 def initialize(attributes={}) @attributes = attributes end |
Instance Method Details
#attributes ⇒ Object
7 8 9 |
# File 'lib/consummo/simple_item.rb', line 7 def attributes @attributes end |
#attributes=(attrs) ⇒ Object
11 12 13 |
# File 'lib/consummo/simple_item.rb', line 11 def attributes=(attrs) @attributes.merge!(attrs) end |
#content ⇒ Object
27 28 29 |
# File 'lib/consummo/simple_item.rb', line 27 def content @attributes[:content] || "" end |
#guid ⇒ Object
23 24 25 |
# File 'lib/consummo/simple_item.rb', line 23 def guid @attributes[:guid] || @attributes[:url] || nil end |
#title ⇒ Object
15 16 17 |
# File 'lib/consummo/simple_item.rb', line 15 def title @attributes[:title] end |
#url ⇒ Object
19 20 21 |
# File 'lib/consummo/simple_item.rb', line 19 def url @attributes[:url] end |