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.



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

Returns the value of attribute created_at.



25
26
27
# File 'lib/pictify/types.rb', line 25

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



25
26
27
# File 'lib/pictify/types.rb', line 25

def id
  @id
end

#rawObject (readonly)

Returns the value of attribute raw.



25
26
27
# File 'lib/pictify/types.rb', line 25

def raw
  @raw
end

#urlObject (readonly)

Returns the value of attribute url.



25
26
27
# File 'lib/pictify/types.rb', line 25

def url
  @url
end