Permalink
Browse files

replace merge chain with reduce

  • Loading branch information...
davejacobs committed Jul 11, 2013
1 parent 35774b7 commit 677d0059ee851f5ca095dcc6405a632a42cc84e9
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/letters/config.rb
View
@@ -31,8 +31,7 @@ def self.user_defaults
end
def self.defaults_with(letter, opts={})
- # TODO: This is obviously a reduce, so change it to that
- global_defaults.merge(defaults[letter]).merge(user_defaults[letter]).merge(opts)
+ [global_defaults, defaults[letter], user_defaults[letter], opts].reduce({}, &:merge)
end
def self.reset_config!

0 comments on commit 677d005

Please sign in to comment.