Class: Rbexy::Nodes::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/rbexy/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#childrenObject (readonly)

Returns the value of attribute children.



14
15
16
# File 'lib/rbexy/nodes.rb', line 14

def children
  @children
end

Instance Method Details

#compileObject



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