Class: Applephile::Item
- Inherits:
-
Object
- Object
- Applephile::Item
- Defined in:
- lib/applephile/item.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#description ⇒ Object
Returns the value of attribute description.
-
#price ⇒ Object
Returns the value of attribute price.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(item_attributes) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(item_attributes) ⇒ Item
Returns a new instance of Item.
5 6 7 |
# File 'lib/applephile/item.rb', line 5 def initialize(item_attributes) item_attributes.each {|key, value| self.send(("#{key}="), value)} end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/applephile/item.rb', line 3 def city @city end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/applephile/item.rb', line 3 def description @description end |
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/applephile/item.rb', line 3 def price @price end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/applephile/item.rb', line 3 def url @url end |