Class: Post
- Inherits:
-
Object
- Object
- Post
- Defined in:
- lib/craigslister/post.rb
Overview
Used for packaging Craigslist post data
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#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) ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize(args) ⇒ Post
Returns a new instance of Post.
5 6 7 8 9 10 11 12 |
# File 'lib/craigslister/post.rb', line 5 def initialize(args) @title = args[:title] @image = args[:image] @price = args[:price] @location = args[:location] @description = args[:description] @url = args[:url] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/craigslister/post.rb', line 3 def description @description end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
3 4 5 |
# File 'lib/craigslister/post.rb', line 3 def image @image end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/craigslister/post.rb', line 3 def location @location end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/craigslister/post.rb', line 3 def price @price end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/craigslister/post.rb', line 3 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/craigslister/post.rb', line 3 def url @url end |