Sha256: 9d0b3c87c6e85280b3c3e294a52895764bb639d2f01eb67ce5de528e01fb0267

Contents?: true

Size: 320 Bytes

Versions: 31

Compression:

Stored size: 320 Bytes

Contents

# encoding: utf-8

module Libis
  module Services

    class HttpError < Exception
      attr_accessor :code, :header, :body

      def initialize(error)
        @code = error[:code]
        @header = error[:header]
        @body = error[:body]
      end

      def message
        code.to_s
      end
    end

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
libis-services-0.1.11 lib/libis/services/http_error.rb
libis-services-0.1.10 lib/libis/services/http_error.rb
libis-services-0.1.9 lib/libis/services/http_error.rb
libis-services-0.1.7 lib/libis/services/http_error.rb
libis-services-0.1.5 lib/libis/services/http_error.rb
libis-services-0.1.3 lib/libis/services/http_error.rb
libis-services-0.1.2 lib/libis/services/http_error.rb
libis-services-0.1.1 lib/libis/services/http_error.rb
libis-services-0.1.0-java lib/libis/services/http_error.rb
libis-services-0.0.3 lib/libis/services/http_error.rb
libis-services-0.0.2 lib/libis/services/http_error.rb