Class: Birch::Edge
- Inherits:
-
Object
- Object
- Birch::Edge
- Defined in:
- lib/birch/pure.rb,
ext/birch/native.c
Instance Attribute Summary collapse
-
#directed ⇒ Object
readonly
Returns the value of attribute directed.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#node_a ⇒ Object
readonly
Returns the value of attribute node_a.
-
#node_b ⇒ Object
readonly
Returns the value of attribute node_b.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(*args) ⇒ Edge
Returns a new instance of Edge.
38 39 40 41 |
# File 'ext/birch/native.c', line 38 def initialize(node_a, node_b, directed = false, direction = 0) @node_a, @node_b = node_a, node_b @directed, @direction = directed, direction end |
Instance Attribute Details
#directed ⇒ Object (readonly)
Returns the value of attribute directed.
119 120 121 |
# File 'lib/birch/pure.rb', line 119 def directed @directed end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
119 120 121 |
# File 'lib/birch/pure.rb', line 119 def direction @direction end |
#node_a ⇒ Object (readonly)
Returns the value of attribute node_a.
118 119 120 |
# File 'lib/birch/pure.rb', line 118 def node_a @node_a end |
#node_b ⇒ Object (readonly)
Returns the value of attribute node_b.
118 119 120 |
# File 'lib/birch/pure.rb', line 118 def node_b @node_b end |