Class: FansWatch::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/fanswatch/attachment.rb

Overview

Attached URL to Posting

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/fanswatch/attachment.rb', line 4

def description
  @description
end

#image_urlObject (readonly)

Returns the value of attribute image_url.



4
5
6
# File 'lib/fanswatch/attachment.rb', line 4

def image_url
  @image_url
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/fanswatch/attachment.rb', line 4

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/fanswatch/attachment.rb', line 4

def url
  @url
end