lib/grumlin/traversal.rb in grumlin-0.2.0 vs lib/grumlin/traversal.rb in grumlin-0.3.0

- old
+ new

@@ -2,21 +2,17 @@ module Grumlin class Traversal attr_reader :connection - def initialize(client_or_url = Grumlin.config.default_client) - @client = if client_or_url.is_a?(String) - Grumlin::Client.new(client_or_url) - else - client_or_url - end + def initialize(pool = Grumlin.config.default_pool) + @pool = pool end # TODO: add other start steps %w[addV addE V E].each do |step| define_method step do |*args| - Step.new(@client, step, *args) + Step.new(@pool, step, *args) end end alias addVertex addV alias addEdge addE