Class: GoogleBase::Item
- Inherits:
-
Object
- Object
- GoogleBase::Item
- Defined in:
- lib/allyourbase.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#description ⇒ Object
Returns the value of attribute description.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#price ⇒ Object
Returns the value of attribute price.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(ae) ⇒ Item
constructor
Constructs an item from.
Constructor Details
#initialize(ae) ⇒ Item
Constructs an item from
65 66 67 68 69 70 71 |
# File 'lib/allyourbase.rb', line 65 def initialize(ae) @author = ae..first.name @title = ae.title @description = ae.content @image_url = ae[GOOGLENS,"image_link"].first @price = ae[GOOGLENS,"price"].first.split(/\s+/).first.to_f end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
59 60 61 |
# File 'lib/allyourbase.rb', line 59 def @author end |
#description ⇒ Object
Returns the value of attribute description.
59 60 61 |
# File 'lib/allyourbase.rb', line 59 def description @description end |
#image_url ⇒ Object
Returns the value of attribute image_url.
59 60 61 |
# File 'lib/allyourbase.rb', line 59 def image_url @image_url end |
#price ⇒ Object
Returns the value of attribute price.
59 60 61 |
# File 'lib/allyourbase.rb', line 59 def price @price end |
#title ⇒ Object
Returns the value of attribute title.
59 60 61 |
# File 'lib/allyourbase.rb', line 59 def title @title end |