Class: TheTvDB::Response::Xmlize
- Inherits:
-
TheTvDB::Response
- Object
- Faraday::Response::Middleware
- TheTvDB::Response
- TheTvDB::Response::Xmlize
- Defined in:
- lib/the_tv_db/response/xmlize.rb
Constant Summary
Constants inherited from TheTvDB::Response
Instance Method Summary collapse
Methods inherited from TheTvDB::Response
define_parser, #parse_response?, #response_type
Instance Method Details
#parse(body) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/the_tv_db/response/xmlize.rb', line 10 def parse(body) case body when '' nil when 'true' true when 'false' false when Hash body.each { |k, v| body[k] = self.class.parser.call(v) } else self.class.parser.call body end end |