Class: Pictify::GifRenderResult

Inherits:
Object
  • Object
show all
Defined in:
lib/pictify/types.rb

Overview

Result of a GIF render (+render_gif+). Flattened from the API's { gif: {...} } envelope.

Maps { url, uid, width, height, animationLength }.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ GifRenderResult

Returns a new instance of GifRenderResult.



97
98
99
100
101
102
103
104
# File 'lib/pictify/types.rb', line 97

def initialize(data)
  @raw = data
  @url = data["url"]
  @uid = data["uid"]
  @width = data["width"]
  @height = data["height"]
  @animation_length = data["animationLength"]
end

Instance Attribute Details

#animation_lengthObject (readonly)

Returns the value of attribute animation_length.



95
96
97
# File 'lib/pictify/types.rb', line 95

def animation_length
  @animation_length
end

#heightObject (readonly)

Returns the value of attribute height.



95
96
97
# File 'lib/pictify/types.rb', line 95

def height
  @height
end

#rawObject (readonly)

Returns the value of attribute raw.



95
96
97
# File 'lib/pictify/types.rb', line 95

def raw
  @raw
end

#uidObject (readonly)

Returns the value of attribute uid.



95
96
97
# File 'lib/pictify/types.rb', line 95

def uid
  @uid
end

#urlObject (readonly)

Returns the value of attribute url.



95
96
97
# File 'lib/pictify/types.rb', line 95

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



95
96
97
# File 'lib/pictify/types.rb', line 95

def width
  @width
end