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.
21 22 23 24 25 26 |
# File 'lib/pictify/types.rb', line 21 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.
19 20 21 |
# File 'lib/pictify/types.rb', line 19 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/pictify/types.rb', line 19 def id @id end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
19 20 21 |
# File 'lib/pictify/types.rb', line 19 def raw @raw end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
19 20 21 |
# File 'lib/pictify/types.rb', line 19 def url @url end |