Class: Mementus::EdgeProxy
- Inherits:
-
Object
- Object
- Mementus::EdgeProxy
- Defined in:
- lib/mementus/edge_proxy.rb
Instance Method Summary collapse
- #[](prop) ⇒ Object
- #from ⇒ Object
- #id ⇒ Object
-
#initialize(edge, graph) ⇒ EdgeProxy
constructor
A new instance of EdgeProxy.
- #label ⇒ Object
- #props ⇒ Object
- #to ⇒ Object
Constructor Details
#initialize(edge, graph) ⇒ EdgeProxy
Returns a new instance of EdgeProxy.
3 4 5 6 |
# File 'lib/mementus/edge_proxy.rb', line 3 def initialize(edge, graph) @edge = edge @graph = graph end |
Instance Method Details
#[](prop) ⇒ Object
16 17 18 |
# File 'lib/mementus/edge_proxy.rb', line 16 def [](prop) @edge[prop] end |
#from ⇒ Object
24 25 26 |
# File 'lib/mementus/edge_proxy.rb', line 24 def from @graph.node(@edge.from.id) end |
#id ⇒ Object
8 9 10 |
# File 'lib/mementus/edge_proxy.rb', line 8 def id @edge.id end |
#label ⇒ Object
12 13 14 |
# File 'lib/mementus/edge_proxy.rb', line 12 def label @edge.label end |
#props ⇒ Object
20 21 22 |
# File 'lib/mementus/edge_proxy.rb', line 20 def props @edge.props end |
#to ⇒ Object
28 29 30 |
# File 'lib/mementus/edge_proxy.rb', line 28 def to @graph.node(@edge.to.id) end |