Class: Animoto::ResponseParsers::YajlAdapter

Inherits:
Base
  • Object
show all
Defined in:
lib/animoto/response_parsers/yajl_adapter.rb

Instance Method Summary collapse

Methods inherited from Base

format, #format

Instance Method Details

#parse(string) ⇒ Hash{String=>Object}

Returns:

  • (Hash{String=>Object})


10
11
12
# File 'lib/animoto/response_parsers/yajl_adapter.rb', line 10

def parse string
  ::Yajl::Parser.parse string
end

#unparse(object) ⇒ String

Returns:

  • (String)


15
16
17
# File 'lib/animoto/response_parsers/yajl_adapter.rb', line 15

def unparse object
  ::Yajl::Encoder.encode object
end