Class: FansWatch::Attachment
- Inherits:
-
Object
- Object
- FansWatch::Attachment
- Defined in:
- lib/fanswatch/attachment.rb
Overview
Attached URL to Posting
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data) ⇒ Attachment
constructor
A new instance of Attachment.
Constructor Details
#initialize(data) ⇒ Attachment
Returns a new instance of Attachment.
6 7 8 9 10 11 12 |
# File 'lib/fanswatch/attachment.rb', line 6 def initialize(data) return unless data @description = data['description'] @url = data['url'] @title = data['title'] @image_url = data['media']['image']['src'] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/fanswatch/attachment.rb', line 4 def description @description end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/fanswatch/attachment.rb', line 4 def url @url end |