lib/messages_dictionary/injector.rb in messages_dictionary-0.1.3.1 vs lib/messages_dictionary/injector.rb in messages_dictionary-0.1.3.2
- old
+ new
@@ -24,10 +24,10 @@
raise KeyError, "#{key} cannot be found in the provided file..."
end
values.each do |k, v|
msg.gsub!(Regexp.new('\{\{' + k.to_s + '\}\}'), v.to_s)
end
- transform = klass::DICTIONARY_CONF[:transform] || block
+ transform = block || klass::DICTIONARY_CONF[:transform]
transform ?
transform.call(msg) :
klass::DICTIONARY_CONF[:output].send(klass::DICTIONARY_CONF[:method].to_sym, msg)
end
private :pretty_output
\ No newline at end of file