Class: Tangle::Directed::Edge
- Inherits:
-
Edge
- Object
- Edge
- Tangle::Directed::Edge
show all
- Defined in:
- lib/tangle/directed/edge.rb
Overview
An edge in a directed graph
Instance Attribute Summary
Attributes inherited from Edge
#graph, #name, #vertices
Instance Method Summary
collapse
Methods inherited from Edge
#clone_into, #eql?, #initialize, #inspect, #other, #walk
Constructor Details
This class inherits a constructor from Tangle::Edge
Instance Method Details
#child(_vertex = nil) ⇒ Object
21
22
23
|
# File 'lib/tangle/directed/edge.rb', line 21
def child(_vertex = nil)
@child
end
|
#child?(vertex) ⇒ Boolean
17
18
19
|
# File 'lib/tangle/directed/edge.rb', line 17
def child?(vertex)
@child == vertex
end
|
#parent(_vertex = nil) ⇒ Object
13
14
15
|
# File 'lib/tangle/directed/edge.rb', line 13
def parent(_vertex = nil)
@parent
end
|
#parent?(vertex) ⇒ Boolean
9
10
11
|
# File 'lib/tangle/directed/edge.rb', line 9
def parent?(vertex)
@parent == vertex
end
|