Class: Furud::Node
- Inherits:
-
Data
- Object
- Data
- Furud::Node
- Defined in:
- lib/furud/types.rb,
sig/furud.rbs
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type:, value: nil, children: []) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(type:, value: nil, children: []) ⇒ Node
Returns a new instance of Node.
41 42 43 |
# File 'lib/furud/types.rb', line 41 def initialize(type:, value: nil, children: []) super(type: type.to_sym, value: value, children: children.freeze) end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children
40 41 42 |
# File 'lib/furud/types.rb', line 40 def children @children end |
#type ⇒ Object (readonly)
Returns the value of attribute type
40 41 42 |
# File 'lib/furud/types.rb', line 40 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value
40 41 42 |
# File 'lib/furud/types.rb', line 40 def value @value end |