./lib/animoto/response_parsers/json_adapter.rb in animoto-0.0.0.alpha9 vs ./lib/animoto/response_parsers/json_adapter.rb in animoto-0.1.0.beta0

- old
+ new

@@ -1,20 +1,21 @@ require 'json' module Animoto - class ResponseParser - class JSONAdapter < Animoto::ResponseParser + module ResponseParsers + class JSONAdapter < Animoto::ResponseParsers::Base @format = 'json' - def parse body - ::JSON.parse body + # @return [Hash<String,Object>] + def parse string + ::JSON.parse string end - def unparse hash - ::JSON.unparse hash + # @return [String] + def unparse object + ::JSON.unparse object end - end adapter_map.merge! :json => JSONAdapter end end \ No newline at end of file