Sha256: 98266ba9ad905d09b94feb4736f7016cf1b206f6857ac163a5ba774a7e61a979

Contents?: true

Size: 316 Bytes

Versions: 14

Compression:

Stored size: 316 Bytes

Contents

module Restfulness

  class HTTPException < ::StandardError

    attr_accessor :status, :payload, :headers

    def initialize(status, payload = "", opts = {})
      @status  = status
      @payload = payload
      @headers = opts[:headers] || {}
      super(opts[:message] || STATUSES[status])
    end

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
restfulness-0.3.6 lib/restfulness/exceptions.rb
restfulness-0.3.5 lib/restfulness/exceptions.rb
restfulness-0.3.4 lib/restfulness/exceptions.rb
restfulness-0.3.3 lib/restfulness/exceptions.rb
restfulness-0.3.2 lib/restfulness/exceptions.rb
restfulness-0.3.1 lib/restfulness/exceptions.rb
restfulness-0.3.0 lib/restfulness/exceptions.rb
restfulness-0.2.6 lib/restfulness/exceptions.rb
restfulness-0.2.5 lib/restfulness/exceptions.rb
restfulness-0.2.4 lib/restfulness/exceptions.rb
restfulness-0.2.3 lib/restfulness/exceptions.rb
restfulness-0.2.2 lib/restfulness/exceptions.rb
restfulness-0.2.1 lib/restfulness/exceptions.rb
restfulness-0.2.0 lib/restfulness/exceptions.rb