Class: Rbexy::Nodes::Template
- Inherits:
-
Object
- Object
- Rbexy::Nodes::Template
- Defined in:
- lib/rbexy/nodes.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(children) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(children) ⇒ Template
Returns a new instance of Template.
16 17 18 |
# File 'lib/rbexy/nodes.rb', line 16 def initialize(children) @children = children end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
14 15 16 |
# File 'lib/rbexy/nodes.rb', line 14 def children @children end |
Instance Method Details
#compile ⇒ Object
20 21 22 |
# File 'lib/rbexy/nodes.rb', line 20 def compile "#{children.map(&:compile).map { |c| "@output_buffer << rbexy_prep_output(#{c})"}.join(";")};@output_buffer" end |