Module: RGeo::ImplHelper::Utils
- Defined in:
- lib/rgeo/impl_helper/utils.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.stringize_hash(hash_) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rgeo/impl_helper/utils.rb', line 11 def stringize_hash(hash_) nhash_ = {} hash_.each do |k_, v_| nhash_[k_.is_a?(::Symbol) ? k_.to_s : k_] = v_.is_a?(::Symbol) ? v_.to_s : v_ end nhash_ end |
.symbolize_hash(hash_) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/rgeo/impl_helper/utils.rb', line 19 def symbolize_hash(hash_) nhash_ = {} hash_.each do |k_, v_| nhash_[k_.is_a?(::String) ? k_.to_sym : k_] = v_.is_a?(::String) ? v_.to_sym : v_ end nhash_ end |