Class: LinkOracle::LinkData::Data
- Inherits:
-
Object
- Object
- LinkOracle::LinkData::Data
- Defined in:
- lib/link_oracle/link_data/data.rb
Instance Attribute Summary collapse
-
#descriptions ⇒ Object
Returns the value of attribute descriptions.
-
#image_urls ⇒ Object
Returns the value of attribute image_urls.
-
#titles ⇒ Object
Returns the value of attribute titles.
Instance Method Summary collapse
- #assign(hash) ⇒ Object
- #description ⇒ Object
- #format_image(image) ⇒ Object
- #image_url ⇒ Object
- #title ⇒ Object
Instance Attribute Details
#descriptions ⇒ Object
Returns the value of attribute descriptions.
4 5 6 |
# File 'lib/link_oracle/link_data/data.rb', line 4 def descriptions @descriptions end |
#image_urls ⇒ Object
Returns the value of attribute image_urls.
4 5 6 |
# File 'lib/link_oracle/link_data/data.rb', line 4 def image_urls @image_urls end |
#titles ⇒ Object
Returns the value of attribute titles.
4 5 6 |
# File 'lib/link_oracle/link_data/data.rb', line 4 def titles @titles end |
Instance Method Details
#assign(hash) ⇒ Object
6 7 8 9 |
# File 'lib/link_oracle/link_data/data.rb', line 6 def assign(hash) hash.each {|key, value| self.send("#{key}=", value) } self end |
#description ⇒ Object
23 24 25 |
# File 'lib/link_oracle/link_data/data.rb', line 23 def description descriptions.first end |
#format_image(image) ⇒ Object
15 16 17 |
# File 'lib/link_oracle/link_data/data.rb', line 15 def format_image(image) Utils::ImageUrlFormatter.new(url, image) end |
#image_url ⇒ Object
11 12 13 |
# File 'lib/link_oracle/link_data/data.rb', line 11 def image_url image_urls.first end |
#title ⇒ Object
19 20 21 |
# File 'lib/link_oracle/link_data/data.rb', line 19 def title titles.first end |