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

- old
+ new

@@ -2,21 +2,18 @@ module Grumlin class Traversal attr_reader :connection - def initialize(client_or_url, &block) + 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 - - return if block.nil? - - TraversingContext.new(self).instance_exec(&block) end + # TODO: add other start steps %w[addV addE V E].each do |step| define_method step do |*args| Step.new(@client, step, *args) end end