Class: Curlybars::Node::Root
- Inherits:
-
Struct
- Object
- Struct
- Curlybars::Node::Root
- Defined in:
- lib/curlybars/node/root.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
Returns the value of attribute position.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
Instance Attribute Details
#position ⇒ Object
Returns the value of attribute position
3 4 5 |
# File 'lib/curlybars/node/root.rb', line 3 def position @position end |
#template ⇒ Object
Returns the value of attribute template
3 4 5 |
# File 'lib/curlybars/node/root.rb', line 3 def template @template end |
Instance Method Details
#compile ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/curlybars/node/root.rb', line 4 def compile # NOTE: the following is a heredoc string, representing the ruby code fragment # outputted by this node. " contexts = [presenter]\n variables = [{}]\n rendering = ::Curlybars::RenderingSupport.new(\n ::Curlybars.configuration.rendering_timeout,\n contexts,\n variables,\n \#{position.file_name.inspect},\n global_helpers_providers,\n ::Curlybars.configuration.cache\n )\n buffer = ::Curlybars::SafeBuffer.new\n \#{template.compile}\n buffer\n RUBY\nend\n" |
#validate(branches) ⇒ Object
24 25 26 |
# File 'lib/curlybars/node/root.rb', line 24 def validate(branches) template.validate(branches) end |