Class: OpenComponents::PrerenderedComponent
- Defined in:
- lib/opencomponents/prerendered_component.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Attributes inherited from Component
#href, #name, #params, #registry_version, #render_mode, #type, #version
Instance Method Summary collapse
Methods inherited from Component
#flush!, #initialize, #reload!, #request_version
Constructor Details
This class inherits a constructor from OpenComponents::Component
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/opencomponents/prerendered_component.rb', line 3 def data @data end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
3 4 5 |
# File 'lib/opencomponents/prerendered_component.rb', line 3 def template @template end |
Instance Method Details
#load ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/opencomponents/prerendered_component.rb', line 5 def load template_data = response_data['template'] @data = response_data['data'] @template = Template.new( template_data['src'], template_data['type'], template_data['key'] ) super end |