Class: RablRails::CompiledTemplate
- Inherits:
-
Object
- Object
- RablRails::CompiledTemplate
- Defined in:
- lib/rabl-rails/template.rb
Instance Attribute Summary collapse
-
#cache_key ⇒ Object
Returns the value of attribute cache_key.
-
#data ⇒ Object
Returns the value of attribute data.
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#root_name ⇒ Object
Returns the value of attribute root_name.
Instance Method Summary collapse
- #add_node(n) ⇒ Object
- #extends(template) ⇒ Object
-
#initialize ⇒ CompiledTemplate
constructor
A new instance of CompiledTemplate.
- #initialize_dup(other) ⇒ Object
Constructor Details
#initialize ⇒ CompiledTemplate
Returns a new instance of CompiledTemplate.
5 6 7 8 9 |
# File 'lib/rabl-rails/template.rb', line 5 def initialize @nodes = [] @data = nil @cache_key = false end |
Instance Attribute Details
#cache_key ⇒ Object
Returns the value of attribute cache_key.
3 4 5 |
# File 'lib/rabl-rails/template.rb', line 3 def cache_key @cache_key end |
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/rabl-rails/template.rb', line 3 def data @data end |
#nodes ⇒ Object
Returns the value of attribute nodes.
3 4 5 |
# File 'lib/rabl-rails/template.rb', line 3 def nodes @nodes end |
#root_name ⇒ Object
Returns the value of attribute root_name.
3 4 5 |
# File 'lib/rabl-rails/template.rb', line 3 def root_name @root_name end |
Instance Method Details
#add_node(n) ⇒ Object
16 17 18 |
# File 'lib/rabl-rails/template.rb', line 16 def add_node(n) @nodes << n end |
#extends(template) ⇒ Object
20 21 22 |
# File 'lib/rabl-rails/template.rb', line 20 def extends(template) @nodes.concat template.nodes end |
#initialize_dup(other) ⇒ Object
11 12 13 14 |
# File 'lib/rabl-rails/template.rb', line 11 def initialize_dup(other) super self.nodes = other.nodes.dup end |