Class: Octokit::Response::FeedParser

Inherits:
BaseMiddleware
  • Object
show all
Defined in:
lib/octokit/response/feed_parser.rb

Overview

Parses RSS and Atom feed responses.

Instance Method Summary collapse

Instance Method Details

#on_complete(env) ⇒ Object



9
10
11
12
13
14
# File 'lib/octokit/response/feed_parser.rb', line 9

def on_complete(env)
  if env[:response_headers]['content-type'] =~ /(\batom|\brss)/
    require 'rss'
    env[:body] = RSS::Parser.parse env[:body]
  end
end