Class: Convection::Model::Template::Resource::ScalarPropertyInstance
- Inherits:
-
PropertyInstance
- Object
- PropertyInstance
- Convection::Model::Template::Resource::ScalarPropertyInstance
- Defined in:
- lib/convection/model/template/resource.rb
Overview
Instance of a scalar property
Instance Attribute Summary
Attributes inherited from PropertyInstance
#current_value, #property, #resource, #value
Instance Method Summary collapse
Methods inherited from PropertyInstance
#current, #default, #initialize, #transform, #validate!
Constructor Details
This class inherits a constructor from Convection::Model::Template::Resource::PropertyInstance
Instance Method Details
#render ⇒ Object
177 178 179 180 181 |
# File 'lib/convection/model/template/resource.rb', line 177 def render return default if value.nil? return value.reference if value.is_a?(Resource) value.respond_to?(:render) ? value.render : value end |
#set(new_value) ⇒ Object
173 174 175 |
# File 'lib/convection/model/template/resource.rb', line 173 def set(new_value) @value = validate!(transform(new_value)) end |