Method: MiniGraph::DSL::GraphContext.evaluate
- Defined in:
- lib/mini_graph/dsl/graph_context.rb
.evaluate(*vertices, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/mini_graph/dsl/graph_context.rb', line 7 def self.evaluate(*vertices, &block) unless block_given? raise ArgumentError, "cannot call .create without a block" end graph_context = new(vertices) graph_context.instance_eval(&block) graph_context.resolve end |