Exception: Blix::Rest::ServiceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/blix/rest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status = nil, headers = nil) ⇒ ServiceError

Returns a new instance of ServiceError.



101
102
103
104
105
# File 'lib/blix/rest.rb', line 101

def initialize(message, status = nil, headers = nil)
  super(message || "")
  @status = (status || 406).to_i
  @headers = headers
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



99
100
101
# File 'lib/blix/rest.rb', line 99

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



98
99
100
# File 'lib/blix/rest.rb', line 98

def status
  @status
end

Instance Method Details

#to_iObject



107
108
109
# File 'lib/blix/rest.rb', line 107

def to_i
  @status
end