Class: MyMoip::JsonParser
- Inherits:
-
Object
- Object
- MyMoip::JsonParser
- Defined in:
- lib/mymoip/json_parser.rb
Class Method Summary collapse
Class Method Details
.call(body, format) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/mymoip/json_parser.rb', line 3 def self.call(body, format) if format == :json JSON.parse body.match(/\?\((?<valid_json>.+)\)/)[:valid_json] else body end end |