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.



91
92
93
94
95
96
97
98
# File 'lib/pictify/types.rb', line 91

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.



89
90
91
# File 'lib/pictify/types.rb', line 89

def animation_length
  @animation_length
end

#heightObject (readonly)

Returns the value of attribute height.



89
90
91
# File 'lib/pictify/types.rb', line 89

def height
  @height
end

#rawObject (readonly)

Returns the value of attribute raw.



89
90
91
# File 'lib/pictify/types.rb', line 89

def raw
  @raw
end

#uidObject (readonly)

Returns the value of attribute uid.



89
90
91
# File 'lib/pictify/types.rb', line 89

def uid
  @uid
end

#urlObject (readonly)

Returns the value of attribute url.



89
90
91
# File 'lib/pictify/types.rb', line 89

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



89
90
91
# File 'lib/pictify/types.rb', line 89

def width
  @width
end