Class: Ebisu::ExImage

Inherits:
Object
  • Object
show all
Defined in:
lib/ebisu/models/ex_image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image) ⇒ ExImage

Returns a new instance of ExImage.



17
18
19
20
21
22
23
# File 'lib/ebisu/models/ex_image.rb', line 17

def initialize(image)
  return unless image

  @url = image.dig('url')
  @width = image.dig('width')
  @height = image.dig('height')
end

Instance Attribute Details

#heightObject

Returns the value of attribute height.



15
16
17
# File 'lib/ebisu/models/ex_image.rb', line 15

def height
  @height
end

#urlObject

Returns the value of attribute url.



7
8
9
# File 'lib/ebisu/models/ex_image.rb', line 7

def url
  @url
end

#widthObject

Returns the value of attribute width.



11
12
13
# File 'lib/ebisu/models/ex_image.rb', line 11

def width
  @width
end