Class: AssertType::TypeNode
- Inherits:
-
Object
- Object
- AssertType::TypeNode
- Defined in:
- lib/assert_type/type_node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #first ⇒ Object
-
#initialize(name) ⇒ TypeNode
constructor
A new instance of TypeNode.
Constructor Details
#initialize(name) ⇒ TypeNode
Returns a new instance of TypeNode.
6 7 8 9 |
# File 'lib/assert_type/type_node.rb', line 6 def initialize name @name = name @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
4 5 6 |
# File 'lib/assert_type/type_node.rb', line 4 def children @children end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/assert_type/type_node.rb', line 4 def name @name end |
Class Method Details
.root ⇒ Object
15 16 17 |
# File 'lib/assert_type/type_node.rb', line 15 def self.root new "_root" end |
Instance Method Details
#first ⇒ Object
11 12 13 |
# File 'lib/assert_type/type_node.rb', line 11 def first @children.first end |