Navigation Menu

Skip to content

Commit

Permalink
Use client options given as a part of options for the constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 15, 2015
1 parent e7fa57b commit 4c8ba98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/drndump/dump_client.rb
Expand Up @@ -34,6 +34,8 @@ def initialize(params)
@receiver_host = params[:receiver_host]
@receiver_port = params[:receiver_port]

@client_options = params[:client_options]

@error_message = nil

@on_finish = nil
Expand All @@ -42,7 +44,7 @@ def initialize(params)
end

def run(options={}, &block)
extra_client_options = options[:client_options] || {}
extra_client_options = options[:client_options] || @client_options || {}
client = Droonga::Client.new(client_options.merge(extra_client_options))
client.on_error = lambda do |error|
on_error(error)
Expand Down

0 comments on commit 4c8ba98

Please sign in to comment.