Module: Pact::SymbolizeKeys
- Included in:
- ConsumerContract, Interaction, Request::Base, ServiceConsumer, ServiceProvider, SomethingLike
- Defined in:
- lib/pact/symbolize_keys.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/pact/symbolize_keys.rb', line 4 def self.included(base) base.extend(self) end |
Instance Method Details
#symbolize_keys(hash) ⇒ Object
8 9 10 |
# File 'lib/pact/symbolize_keys.rb', line 8 def symbolize_keys hash hash.inject({}) { |memo, (k,v)| memo[k.to_sym] = v; memo } end |