Skip to content

Commit

Permalink
Do not overwrite falsey value with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
aeroastro committed Sep 7, 2017
1 parent b4c6a9f commit 612d26c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/shinq/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class Configuration

def initialize(opts)
%i(require worker_name db_config queue_db default_db process queue_timeout daemonize statistics lifecycle abort_on_error).each do |k|
send(:"#{k}=", opts[k] || DEFAULT[k])

value = opts.key?(k) ? opts[k] : DEFAULT[k]
send(:"#{k}=", value)
end
end

Expand Down

0 comments on commit 612d26c

Please sign in to comment.