Module: SafeType::HashMixin
- Included in:
- Hash
- Defined in:
- lib/safe_type/mixin/hash.rb
Instance Method Summary collapse
Instance Method Details
#stringify_keys ⇒ Object
3 4 5 |
# File 'lib/safe_type/mixin/hash.rb', line 3 def stringify_keys ::Hash[self.map{ |key, val| [key.to_s, val] }] end |
#symbolize_keys ⇒ Object
6 7 8 |
# File 'lib/safe_type/mixin/hash.rb', line 6 def symbolize_keys ::Hash[self.map{ |key, val| [key.to_sym, val] }] end |