Class: Pictify::TemplateVariableDefinition
- Inherits:
-
Object
- Object
- Pictify::TemplateVariableDefinition
- Defined in:
- lib/pictify/types.rb
Overview
A variable definition declared on a template.
The API keys variables by name and may include type, defaultValue, description, and validation. Unknown engine-specific fields are kept in raw.
Instance Attribute Summary collapse
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#validation ⇒ Object
readonly
Returns the value of attribute validation.
Instance Method Summary collapse
-
#initialize(data) ⇒ TemplateVariableDefinition
constructor
A new instance of TemplateVariableDefinition.
Constructor Details
#initialize(data) ⇒ TemplateVariableDefinition
Returns a new instance of TemplateVariableDefinition.
171 172 173 174 175 176 177 178 |
# File 'lib/pictify/types.rb', line 171 def initialize(data) @raw = data @name = data["name"] @type = data["type"] @default_value = data["defaultValue"] @description = data["description"] @validation = data["validation"] end |
Instance Attribute Details
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
169 170 171 |
# File 'lib/pictify/types.rb', line 169 def default_value @default_value end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
169 170 171 |
# File 'lib/pictify/types.rb', line 169 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
169 170 171 |
# File 'lib/pictify/types.rb', line 169 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
169 170 171 |
# File 'lib/pictify/types.rb', line 169 def raw @raw end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
169 170 171 |
# File 'lib/pictify/types.rb', line 169 def type @type end |
#validation ⇒ Object (readonly)
Returns the value of attribute validation.
169 170 171 |
# File 'lib/pictify/types.rb', line 169 def validation @validation end |