Class: Item
- Inherits:
-
Object
- Object
- Item
- Defined in:
- lib/craigslister.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(args) ⇒ Item
constructor
A new instance of Item.
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
#image ⇒ Object (readonly)
Returns the value of attribute image.
98 99 100 |
# File 'lib/craigslister.rb', line 98 def image @image end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
98 99 100 |
# File 'lib/craigslister.rb', line 98 def location @location end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
98 99 100 |
# File 'lib/craigslister.rb', line 98 def price @price end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
98 99 100 |
# File 'lib/craigslister.rb', line 98 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
98 99 100 |
# File 'lib/craigslister.rb', line 98 def url @url end |