Sha256: 35efc5593c4d25b233798a2387644c67d4742ffdaeac1ce1cb92c7b697e2003a
Contents?: true
Size: 613 Bytes
Versions: 1
Compression:
Stored size: 613 Bytes
Contents
module Guard class Depend module Options DEFAULTS = { run_on_start: false, output_paths: [], cmd: nil } class << self def with_defaults(options = {}) _deep_merge(DEFAULTS, options) end private def _deep_merge(hash1, hash2) hash1.merge(hash2) do |key, oldval, newval| if oldval.instance_of?(Hash) && newval.instance_of?(Hash) _deep_merge(oldval, newval) else newval end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
guard-depend-0.0.1 | lib/guard/depend/options.rb |