Class: Animoto::ResponseParsers::Base Abstract
- Inherits:
-
Object
- Object
- Animoto::ResponseParsers::Base
- Defined in:
- lib/animoto/response_parsers/base.rb
Overview
Direct Known Subclasses
Class Method Summary collapse
-
.format ⇒ String
Returns the format of this parser class.
Instance Method Summary collapse
-
#format ⇒ String
Returns the format of this parser.
-
#parse(body) ⇒ Hash{String=>Object}
abstract
Parses a response body into a usable Hash.
-
#unparse(hash) ⇒ String
abstract
Serializes a Hash into the format for this parser.
Class Method Details
.format ⇒ String
Returns the format of this parser class.
16 17 18 |
# File 'lib/animoto/response_parsers/base.rb', line 16 def self.format @format end |
Instance Method Details
#format ⇒ String
Returns the format of this parser.
23 24 25 |
# File 'lib/animoto/response_parsers/base.rb', line 23 def format self.class.format end |
#parse(body) ⇒ Hash{String=>Object}
This method is abstract.
Parses a response body into a usable Hash.
33 34 35 |
# File 'lib/animoto/response_parsers/base.rb', line 33 def parse body raise AbstractMethodError end |
#unparse(hash) ⇒ String
This method is abstract.
Serializes a Hash into the format for this parser.
43 44 45 |
# File 'lib/animoto/response_parsers/base.rb', line 43 def unparse hash raise AbstractMethodError end |