Class: JsonApiClient::KeyFormatter
- Defined in:
- lib/json_api_client/formatter.rb
Direct Known Subclasses
CamelizedKeyFormatter, DasherizedKeyFormatter, UnderscoredKeyFormatter
Class Method Summary collapse
Methods inherited from Formatter
Class Method Details
.format(key) ⇒ Object
27 28 29 |
# File 'lib/json_api_client/formatter.rb', line 27 def format(key) super end |
.format_keys(hash) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/json_api_client/formatter.rb', line 31 def format_keys(hash) Hash[ hash.map do |key, value| [format(key).to_sym, value] end ] end |
.unformat(formatted_key) ⇒ Object
39 40 41 |
# File 'lib/json_api_client/formatter.rb', line 39 def unformat(formatted_key) super end |