Class: Pictify::ImageResult
- Inherits:
-
Object
- Object
- Pictify::ImageResult
- Defined in:
- lib/pictify/types.rb
Overview
Result of an /image render (+render_html+ / render_url).
Maps the API response { url, id, createdAt }.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data) ⇒ ImageResult
constructor
A new instance of ImageResult.
Constructor Details
#initialize(data) ⇒ ImageResult
Returns a new instance of ImageResult.
27 28 29 30 31 32 |
# File 'lib/pictify/types.rb', line 27 def initialize(data) @raw = data @url = data["url"] @id = data["id"] @created_at = data["createdAt"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
25 26 27 |
# File 'lib/pictify/types.rb', line 25 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
25 26 27 |
# File 'lib/pictify/types.rb', line 25 def id @id end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
25 26 27 |
# File 'lib/pictify/types.rb', line 25 def raw @raw end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
25 26 27 |
# File 'lib/pictify/types.rb', line 25 def url @url end |