Class: EJX::Template::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/ejx/template/node.rb

Direct Known Subclasses

Base, HTMLTag, Subtemplate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(escape: nil) ⇒ Node

Returns a new instance of Node.



5
6
7
8
# File 'lib/ejx/template/node.rb', line 5

def initialize(escape: nil)
  @children = []
  @escape = escape
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



3
4
5
# File 'lib/ejx/template/node.rb', line 3

def children
  @children
end

Instance Method Details

#push(*values) ⇒ Object Also known as: <<



10
11
12
13
# File 'lib/ejx/template/node.rb', line 10

def push(*values)
  @children.push(*values)
  self
end