Class: PacerApi::ResponseTranslator
- Inherits:
-
Object
- Object
- PacerApi::ResponseTranslator
- Defined in:
- lib/pacer_api/response_translator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.translate(obj) ⇒ Object
8 9 10 |
# File 'lib/pacer_api/response_translator.rb', line 8 def self.translate(obj) new.translate(obj) end |
Instance Method Details
#translate(obj) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/pacer_api/response_translator.rb', line 12 def translate(obj) case obj when Array then translate_array(obj) when Date then translate_date(obj) when Hash then translate_hash(obj) when String then translate_string(obj) else obj end end |