Class: Pictify::ListTemplatesResult
- Inherits:
-
Object
- Object
- Pictify::ListTemplatesResult
- Defined in:
- lib/pictify/types.rb
Overview
Result of listing templates (list_templates).
Maps { templates: […], pagination: {…} }.
Instance Attribute Summary collapse
-
#pagination ⇒ Object
readonly
Returns the value of attribute pagination.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
Instance Method Summary collapse
-
#initialize(data) ⇒ ListTemplatesResult
constructor
A new instance of ListTemplatesResult.
Constructor Details
#initialize(data) ⇒ ListTemplatesResult
Returns a new instance of ListTemplatesResult.
250 251 252 253 254 |
# File 'lib/pictify/types.rb', line 250 def initialize(data) @raw = data @templates = (data["templates"] || []).map { |t| Template.new(t) } @pagination = data["pagination"] ? Pagination.new(data["pagination"]) : nil end |
Instance Attribute Details
#pagination ⇒ Object (readonly)
Returns the value of attribute pagination.
248 249 250 |
# File 'lib/pictify/types.rb', line 248 def pagination @pagination end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
248 249 250 |
# File 'lib/pictify/types.rb', line 248 def raw @raw end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
248 249 250 |
# File 'lib/pictify/types.rb', line 248 def templates @templates end |