Class: Tinybucket::Parser::BaseParser
- Inherits:
-
FaradayMiddleware::ResponseMiddleware
- Object
- FaradayMiddleware::ResponseMiddleware
- Tinybucket::Parser::BaseParser
- Defined in:
- lib/tinybucket/parser/base_parser.rb
Direct Known Subclasses
BranchParser, BranchRestrictionParser, BranchRestrictionsParser, BranchesParser, BuildStatusParser, BuildsParser, CommentParser, CommentsParser, CommitParser, CommitsParser, ProfileParser, ProfilesParser, ProjectParser, ProjectsParser, PullRequestParser, PullRequestsParser, RepoParser, ReposParser, TeamParser, TeamsParser
Instance Method Summary collapse
-
#convert(_json) ⇒ Object
override on subclass.
- #parse_response?(env) ⇒ Boolean
- #process_response(env) ⇒ Object
Instance Method Details
#convert(_json) ⇒ Object
override on subclass
15 |
# File 'lib/tinybucket/parser/base_parser.rb', line 15 def convert(_json); end |
#parse_response?(env) ⇒ Boolean
10 11 12 |
# File 'lib/tinybucket/parser/base_parser.rb', line 10 def parse_response?(env) (env[:body]).is_a?(Hash) end |
#process_response(env) ⇒ Object
6 7 8 |
# File 'lib/tinybucket/parser/base_parser.rb', line 6 def process_response(env) env[:body] = convert(env[:body]) end |