Class: Lrama::Counterexamples::Node
- Inherits:
-
Object
- Object
- Lrama::Counterexamples::Node
- Defined in:
- lib/lrama/counterexamples/node.rb
Instance Attribute Summary collapse
-
#elem ⇒ Object
readonly
: E.
-
#next_node ⇒ Object
readonly
: Node?.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(elem, next_node) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(elem, next_node) ⇒ Node
Returns a new instance of Node.
24 25 26 27 |
# File 'lib/lrama/counterexamples/node.rb', line 24 def initialize(elem, next_node) @elem = elem @next_node = next_node end |
Instance Attribute Details
#elem ⇒ Object (readonly)
: E
8 9 10 |
# File 'lib/lrama/counterexamples/node.rb', line 8 def elem @elem end |
#next_node ⇒ Object (readonly)
: Node?
9 10 11 |
# File 'lib/lrama/counterexamples/node.rb', line 9 def next_node @next_node end |
Class Method Details
.to_a(node) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lrama/counterexamples/node.rb', line 12 def self.to_a(node) a = [] # steep:ignore UnannotatedEmptyCollection while (node) a << node.elem node = node.next_node end a end |