Class: Rhales::RueFormatParser::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/rhales/parsers/rue_format_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, location, value: nil, children: []) ⇒ Node

Returns a new instance of Node.



50
51
52
53
54
55
# File 'lib/rhales/parsers/rue_format_parser.rb', line 50

def initialize(type, location, value: nil, children: [])
  @type     = type
  @location = location
  @value    = value
  @children = children
end

Instance Attribute Details

#childrenObject (readonly)

Returns the value of attribute children.



48
49
50
# File 'lib/rhales/parsers/rue_format_parser.rb', line 48

def children
  @children
end

#locationObject (readonly)

Returns the value of attribute location.



48
49
50
# File 'lib/rhales/parsers/rue_format_parser.rb', line 48

def location
  @location
end

#typeObject (readonly)

Returns the value of attribute type.



48
49
50
# File 'lib/rhales/parsers/rue_format_parser.rb', line 48

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



48
49
50
# File 'lib/rhales/parsers/rue_format_parser.rb', line 48

def value
  @value
end