Class: Hash

Inherits:
Object show all
Defined in:
lib/thread_storm/active_support.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#option_merge(options) ⇒ Object



30
31
32
# File 'lib/thread_storm/active_support.rb', line 30

def option_merge(options)
  symbolize_keys.reverse_merge(options)
end

#reverse_merge(other) ⇒ Object



26
27
28
# File 'lib/thread_storm/active_support.rb', line 26

def reverse_merge(other)
  other.merge(self)
end

#symbolize_keysObject



22
23
24
# File 'lib/thread_storm/active_support.rb', line 22

def symbolize_keys
  inject({}){ |memo, (k, v)| memo[k.to_sym] = v; memo }
end