lib/dumpdb/settings.rb in dumpdb-2.0.0 vs lib/dumpdb/settings.rb in dumpdb-2.1.0

- old
+ new

@@ -4,11 +4,11 @@ class Base attr_reader :proc - def initialize(proc=nil) + def initialize(proc = nil) @proc = proc.kind_of?(::Proc) ? proc : Proc.new { proc } end def value(script) script.instance_eval &@proc @@ -43,11 +43,11 @@ end class DumpCmd < Cmd - def value(script, placeholder_vals={}) + def value(script, placeholder_vals = {}) val = super(script, script.source.to_hash.merge(placeholder_vals)) if script.ssh? val = val.gsub("\\", "\\\\\\").gsub('"', '\"') val = "ssh -A #{script.ssh_opts} #{script.ssh} \"#{val}\"" end @@ -56,11 +56,11 @@ end class RestoreCmd < Cmd - def value(script, placeholder_vals={}) + def value(script, placeholder_vals = {}) super(script, script.target.to_hash.merge(placeholder_vals)) end end @@ -76,10 +76,10 @@ end class CmdList < ::Array - def value(script, placeholder_vals={}) + def value(script, placeholder_vals = {}) self.map{ |cmd| cmd.value(script, placeholder_vals) } end end