Class: Mirror::Api::ResponseData
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Mirror::Api::ResponseData
- Defined in:
- lib/mirror-api/response_data.rb
Instance Method Summary collapse
-
#convert_key(key) ⇒ Object
:nodoc:.
Instance Method Details
#convert_key(key) ⇒ Object
:nodoc:
6 7 8 9 10 11 12 |
# File 'lib/mirror-api/response_data.rb', line 6 def convert_key(key) #:nodoc: key.to_s.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end |