Class: Applephile::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/applephile/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/applephile/item.rb', line 3

def city
  @city
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/applephile/item.rb', line 3

def description
  @description
end

#priceObject

Returns the value of attribute price.



3
4
5
# File 'lib/applephile/item.rb', line 3

def price
  @price
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/applephile/item.rb', line 3

def url
  @url
end