Class: Mementus::NodeProxy
- Inherits:
-
Object
- Object
- Mementus::NodeProxy
- Defined in:
- lib/mementus/node_proxy.rb
Instance Method Summary collapse
- #[](prop) ⇒ Object
- #each_adjacent(&block) ⇒ Object
- #id ⇒ Object
- #incoming(match = nil) ⇒ Object
-
#initialize(node, graph) ⇒ NodeProxy
constructor
A new instance of NodeProxy.
- #label ⇒ Object
- #out ⇒ Object
- #out_e ⇒ Object
- #outgoing(match = nil) ⇒ Object
-
#outgoing_edges(match = nil) ⇒ Object
TODO: Fix.
- #props ⇒ Object
Constructor Details
#initialize(node, graph) ⇒ NodeProxy
3 4 5 6 |
# File 'lib/mementus/node_proxy.rb', line 3 def initialize(node, graph) @node = node @graph = graph end |
Instance Method Details
#[](prop) ⇒ Object
16 17 18 |
# File 'lib/mementus/node_proxy.rb', line 16 def [](prop) @node[prop] end |
#each_adjacent(&block) ⇒ Object
32 33 34 |
# File 'lib/mementus/node_proxy.rb', line 32 def each_adjacent(&block) @graph.each_adjacent(@node.id, &block) end |
#id ⇒ Object
8 9 10 |
# File 'lib/mementus/node_proxy.rb', line 8 def id @node.id end |
#incoming(match = nil) ⇒ Object
40 41 42 |
# File 'lib/mementus/node_proxy.rb', line 40 def incoming(match=nil) @graph.incoming(@node.id, match) end |
#label ⇒ Object
12 13 14 |
# File 'lib/mementus/node_proxy.rb', line 12 def label @node.label end |
#out ⇒ Object
24 25 26 |
# File 'lib/mementus/node_proxy.rb', line 24 def out Pipeline::Step.new([self], Pipeline::Pipe.new(@graph), @graph).out_e end |
#out_e ⇒ Object
28 29 30 |
# File 'lib/mementus/node_proxy.rb', line 28 def out_e Pipeline::Step.new([self], Pipeline::Pipe.new(@graph), @graph).out_e end |
#outgoing(match = nil) ⇒ Object
36 37 38 |
# File 'lib/mementus/node_proxy.rb', line 36 def outgoing(match=nil) @graph.outgoing(@node.id, match) end |
#outgoing_edges(match = nil) ⇒ Object
TODO: Fix
45 46 47 |
# File 'lib/mementus/node_proxy.rb', line 45 def outgoing_edges(match=nil) @graph.outgoing_edges(@node.id, match) end |
#props ⇒ Object
20 21 22 |
# File 'lib/mementus/node_proxy.rb', line 20 def props @node.props end |