Class: Pictify::RenderResultItem
- Inherits:
-
Object
- Object
- Pictify::RenderResultItem
- 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
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#layout ⇒ Object
readonly
Returns the value of attribute layout.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(data) ⇒ RenderResultItem
constructor
A new instance of RenderResultItem.
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_at ⇒ Object (readonly)
Returns the value of attribute created_at.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def created_at @created_at end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def format @format end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def id @id end |
#layout ⇒ Object (readonly)
Returns the value of attribute layout.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def layout @layout end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def raw @raw end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
33 34 35 |
# File 'lib/pictify/types.rb', line 33 def width @width end |