Class: Pictify::VideoTemplateVariables
- Inherits:
-
Object
- Object
- Pictify::VideoTemplateVariables
- Defined in:
- lib/pictify/types.rb
Overview
A video template's variable definitions (+get_video_template_variables+) — what you can set when rendering it.
Maps { templateUid, templateName, kind, variables: [...], referenced: [...] }.
referenced lists every variable name the document actually references.
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#referenced ⇒ Object
readonly
Returns the value of attribute referenced.
-
#template_name ⇒ Object
readonly
Returns the value of attribute template_name.
-
#template_uid ⇒ Object
readonly
Returns the value of attribute template_uid.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Instance Method Summary collapse
-
#initialize(data) ⇒ VideoTemplateVariables
constructor
A new instance of VideoTemplateVariables.
Constructor Details
#initialize(data) ⇒ VideoTemplateVariables
Returns a new instance of VideoTemplateVariables.
311 312 313 314 315 316 317 318 |
# File 'lib/pictify/types.rb', line 311 def initialize(data) @raw = data @template_uid = data["templateUid"] @template_name = data["templateName"] @kind = data["kind"] @variables = (data["variables"] || []).map { |v| TemplateVariableDefinition.new(v) } @referenced = data["referenced"] || [] end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
309 310 311 |
# File 'lib/pictify/types.rb', line 309 def kind @kind end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
309 310 311 |
# File 'lib/pictify/types.rb', line 309 def raw @raw end |
#referenced ⇒ Object (readonly)
Returns the value of attribute referenced.
309 310 311 |
# File 'lib/pictify/types.rb', line 309 def referenced @referenced end |
#template_name ⇒ Object (readonly)
Returns the value of attribute template_name.
309 310 311 |
# File 'lib/pictify/types.rb', line 309 def template_name @template_name end |
#template_uid ⇒ Object (readonly)
Returns the value of attribute template_uid.
309 310 311 |
# File 'lib/pictify/types.rb', line 309 def template_uid @template_uid end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
309 310 311 |
# File 'lib/pictify/types.rb', line 309 def variables @variables end |