Class: Graphable::EdgeCreator
- Inherits:
-
Object
- Object
- Graphable::EdgeCreator
show all
- Extended by:
- Forwardable
- Defined in:
- lib/graphable/edge_creator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(source, target, method, opts) ⇒ EdgeCreator
Returns a new instance of EdgeCreator.
17
18
19
20
21
22
23
24
|
# File 'lib/graphable/edge_creator.rb', line 17
def initialize(source, target, method, opts)
@source = source
@target = target
@method = method
@name = opts[:name] || method
@metadata_proc = opts[:block]
@target_name = opts[:target_method]
end
|
Class Method Details
.through(*args) ⇒ Object
7
8
9
10
|
# File 'lib/graphable/edge_creator.rb', line 7
def self.through(*args)
ThroughEdgeCreator.new(*args)
end
|
.via(*args) ⇒ Object
12
13
14
15
|
# File 'lib/graphable/edge_creator.rb', line 12
def self.via(*args)
ViaEdgeCreator.new(*args)
end
|