Class: Github::Response::AtomParser

Inherits:
Github::Response
  • Object
show all
Defined in:
lib/github_api/response/atom_parser.rb

Constant Summary

Constants inherited from Github::Response

CONTENT_TYPE

Instance Method Summary collapse

Methods inherited from Github::Response

define_parser, #parse_body?, #parse_response?, #parse_response_type?, #process_body, #response_type

Constructor Details

#initialize(app, options = {}) ⇒ AtomParser

Returns a new instance of AtomParser.



12
13
14
# File 'lib/github_api/response/atom_parser.rb', line 12

def initialize(app, options = {})
  super(app, options.merge(content_type: /(\batom|\brss)/))
end

Instance Method Details

#on_complete(env) ⇒ Object



16
17
18
19
20
# File 'lib/github_api/response/atom_parser.rb', line 16

def on_complete(env)
  if parse_body?(env)
    process_body(env)
  end
end