Class: Pictify::RenderResultItem

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

Overview

A single rendered layout item within a template render response.

Maps { layout, url, width, height, format, name, id, createdAt }.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ RenderResultItem

Returns a new instance of RenderResultItem.



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/pictify/types.rb', line 35

def initialize(data)
  @raw = data
  @layout = data["layout"]
  @url = data["url"]
  @width = data["width"]
  @height = data["height"]
  @format = data["format"]
  @name = data["name"]
  @id = data["id"]
  @created_at = data["createdAt"]
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



33
34
35
# File 'lib/pictify/types.rb', line 33

def created_at
  @created_at
end

#formatObject (readonly)

Returns the value of attribute format.



33
34
35
# File 'lib/pictify/types.rb', line 33

def format
  @format
end

#heightObject (readonly)

Returns the value of attribute height.



33
34
35
# File 'lib/pictify/types.rb', line 33

def height
  @height
end

#idObject (readonly)

Returns the value of attribute id.



33
34
35
# File 'lib/pictify/types.rb', line 33

def id
  @id
end

#layoutObject (readonly)

Returns the value of attribute layout.



33
34
35
# File 'lib/pictify/types.rb', line 33

def layout
  @layout
end

#nameObject (readonly)

Returns the value of attribute name.



33
34
35
# File 'lib/pictify/types.rb', line 33

def name
  @name
end

#rawObject (readonly)

Returns the value of attribute raw.



33
34
35
# File 'lib/pictify/types.rb', line 33

def raw
  @raw
end

#urlObject (readonly)

Returns the value of attribute url.



33
34
35
# File 'lib/pictify/types.rb', line 33

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



33
34
35
# File 'lib/pictify/types.rb', line 33

def width
  @width
end