Exception: Exa::Errors::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/exa/errors.rb

Direct Known Subclasses

APIError, ConfigurationError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, url: nil, status: nil, headers: nil, body: nil) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
13
14
# File 'lib/exa/errors.rb', line 8

def initialize(message = nil, url: nil, status: nil, headers: nil, body: nil)
  super(message)
  @url = url
  @status = status
  @headers = headers
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/exa/errors.rb', line 6

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



6
7
8
# File 'lib/exa/errors.rb', line 6

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/exa/errors.rb', line 6

def status
  @status
end

#urlObject (readonly)

Returns the value of attribute url.



6
7
8
# File 'lib/exa/errors.rb', line 6

def url
  @url
end