Class: Pictify::ImageResult

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_atObject (readonly)

Returns the value of attribute created_at.



19
20
21
# File 'lib/pictify/types.rb', line 19

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



19
20
21
# File 'lib/pictify/types.rb', line 19

def id
  @id
end

#rawObject (readonly)

Returns the value of attribute raw.



19
20
21
# File 'lib/pictify/types.rb', line 19

def raw
  @raw
end

#urlObject (readonly)

Returns the value of attribute url.



19
20
21
# File 'lib/pictify/types.rb', line 19

def url
  @url
end