Sha256: 47fa271b2afda41de978c1f4d25269efbb029d76e80bef32e3c868be98462d10

Contents?: true

Size: 395 Bytes

Versions: 16

Compression:

Stored size: 395 Bytes

Contents

# encoding: utf-8

require 'faraday'

module Github
  class Response::AtomParser < Response
    define_parser do |body|
      require 'rss'
      RSS::Parser.parse(body)
    end

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

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

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
github_api2-1.0.1 lib/github_api2/response/atom_parser.rb
github_api2-1.0.0 lib/github_api2/response/atom_parser.rb
github_api-0.19.0 lib/github_api/response/atom_parser.rb
lingfennan-github_api-0.18.2 lib/github_api/response/atom_parser.rb
github_api-0.18.2 lib/github_api/response/atom_parser.rb
github_api-0.18.1 lib/github_api/response/atom_parser.rb
github_api-0.17.0 lib/github_api/response/atom_parser.rb
github_api-0.16.0 lib/github_api/response/atom_parser.rb
github_api-0.15.0 lib/github_api/response/atom_parser.rb
github_api-0.14.5 lib/github_api/response/atom_parser.rb
github_api-0.14.4 lib/github_api/response/atom_parser.rb
github_api-0.14.3 lib/github_api/response/atom_parser.rb
github_api-0.14.2 lib/github_api/response/atom_parser.rb
github_api-0.14.1 lib/github_api/response/atom_parser.rb
github_api-0.14.0 lib/github_api/response/atom_parser.rb
github_api-0.13.1 lib/github_api/response/atom_parser.rb