Module: ThreeScale::Backend::Extensions::Hash
- Defined in:
- lib/3scale/backend/extensions/hash.rb
Instance Method Summary collapse
Instance Method Details
#symbolize_names ⇒ Object
5 6 7 8 9 10 |
# File 'lib/3scale/backend/extensions/hash.rb', line 5 def symbolize_names inject({}) do |memo, (key, value)| memo[key.to_sym] = value memo end end |
#valid_encoding? ⇒ Boolean
12 13 14 15 16 17 18 19 20 |
# File 'lib/3scale/backend/extensions/hash.rb', line 12 def valid_encoding? self.each do |k, v| return false if k.is_a?(String) && !k.valid_encoding? if v.is_a?(String) || v.is_a?(Array) || v.is_a?(Hash) return false unless v.valid_encoding? end end return true end |