Class: Curly::Parser::Root

Inherits:
Object
  • Object
show all
Defined in:
lib/curly/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRoot

Returns a new instance of Root


55
56
57
# File 'lib/curly/parser.rb', line 55

def initialize
  @nodes = []
end

Instance Attribute Details

#nodesObject (readonly)

Returns the value of attribute nodes


53
54
55
# File 'lib/curly/parser.rb', line 53

def nodes
  @nodes
end

Instance Method Details

#<<(node) ⇒ Object


59
60
61
# File 'lib/curly/parser.rb', line 59

def <<(node)
  @nodes << node
end

#closed_by?(component) ⇒ Boolean

Returns:

  • (Boolean)

67
68
69
# File 'lib/curly/parser.rb', line 67

def closed_by?(component)
  false
end

#to_sObject


63
64
65
# File 'lib/curly/parser.rb', line 63

def to_s
  "<root>"
end