Class: Evri::Image

Inherits:
Media
  • Object
show all
Defined in:
lib/evri/media.rb

Overview

Represents an Image.

Defined Under Namespace

Classes: Thumbnail

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Image

:nodoc:



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/evri/media.rb', line 23

def initialize json # :nodoc:
  @title    = json[:title]
  @width    = json[:width]
  @height   = json[:height]
  @url      = json[:url]
  @size      = json[:size]
  @title      = json[:title]
  @article_href      = json[:articleHref]
  @mime_type      = json[:mimeType]
  @date      = Date.parse(json[:date])
  @content  = json[:content]
  @click_url  = json[:clickUrl]
  @thumbnail = Thumbnail.new(json[:thumbnail])
end

Instance Attribute Details

#article_hrefObject

Returns the value of attribute article_href.



22
23
24
# File 'lib/evri/media.rb', line 22

def article_href
  @article_href
end

#click_urlObject

Returns the value of attribute click_url.



22
23
24
# File 'lib/evri/media.rb', line 22

def click_url
  @click_url
end

#contentObject

Returns the value of attribute content.



22
23
24
# File 'lib/evri/media.rb', line 22

def content
  @content
end

#dateObject

Returns the value of attribute date.



22
23
24
# File 'lib/evri/media.rb', line 22

def date
  @date
end

#heightObject

Returns the value of attribute height.



22
23
24
# File 'lib/evri/media.rb', line 22

def height
  @height
end

#mime_typeObject

Returns the value of attribute mime_type.



22
23
24
# File 'lib/evri/media.rb', line 22

def mime_type
  @mime_type
end

#sizeObject

Returns the value of attribute size.



22
23
24
# File 'lib/evri/media.rb', line 22

def size
  @size
end

#thumbnailObject

Returns the value of attribute thumbnail.



22
23
24
# File 'lib/evri/media.rb', line 22

def thumbnail
  @thumbnail
end

#titleObject

Returns the value of attribute title.



22
23
24
# File 'lib/evri/media.rb', line 22

def title
  @title
end

#urlObject

Returns the value of attribute url.



22
23
24
# File 'lib/evri/media.rb', line 22

def url
  @url
end

#widthObject

Returns the value of attribute width.



22
23
24
# File 'lib/evri/media.rb', line 22

def width
  @width
end