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 |
# File 'lib/rabl-rails/template.rb', line 5 def initialize @nodes = [] @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
15 16 17 |
# File 'lib/rabl-rails/template.rb', line 15 def add_node(n) @nodes << n end |
#extends(template) ⇒ Object
19 20 21 |
# File 'lib/rabl-rails/template.rb', line 19 def extends(template) @nodes.concat template.nodes end |
#initialize_dup(other) ⇒ Object
10 11 12 13 |
# File 'lib/rabl-rails/template.rb', line 10 def initialize_dup(other) super self.nodes = other.nodes.dup end |