Class: Item

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Item

Returns a new instance of Item.



100
101
102
103
104
105
106
# File 'lib/craigslister.rb', line 100

def initialize args
  @title    = args[:title]
  @image    = args[:image]
  @price    = args[:price]
  @location = args[:location]
  @url      = args[:url]
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



98
99
100
# File 'lib/craigslister.rb', line 98

def image
  @image
end

#locationObject (readonly)

Returns the value of attribute location.



98
99
100
# File 'lib/craigslister.rb', line 98

def location
  @location
end

#priceObject (readonly)

Returns the value of attribute price.



98
99
100
# File 'lib/craigslister.rb', line 98

def price
  @price
end

#titleObject (readonly)

Returns the value of attribute title.



98
99
100
# File 'lib/craigslister.rb', line 98

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



98
99
100
# File 'lib/craigslister.rb', line 98

def url
  @url
end