Class: Pictify::VideoTemplateVariables

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

Instance Method Summary collapse

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

#kindObject (readonly)

Returns the value of attribute kind.



309
310
311
# File 'lib/pictify/types.rb', line 309

def kind
  @kind
end

#rawObject (readonly)

Returns the value of attribute raw.



309
310
311
# File 'lib/pictify/types.rb', line 309

def raw
  @raw
end

#referencedObject (readonly)

Returns the value of attribute referenced.



309
310
311
# File 'lib/pictify/types.rb', line 309

def referenced
  @referenced
end

#template_nameObject (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_uidObject (readonly)

Returns the value of attribute template_uid.



309
310
311
# File 'lib/pictify/types.rb', line 309

def template_uid
  @template_uid
end

#variablesObject (readonly)

Returns the value of attribute variables.



309
310
311
# File 'lib/pictify/types.rb', line 309

def variables
  @variables
end