Exception: FlexmlsApi::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/flexmls_api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ClientError

Returns a new instance of ClientError.



33
34
35
36
37
38
39
40
# File 'lib/flexmls_api/response.rb', line 33

def initialize (options = {})
  # Support the standard initializer for errors
  opts = options.is_a?(Hash) ? options : {:message => options.to_s}
  @code = opts[:code]
  @status = opts[:status]
  @details = opts[:details]
  super(opts[:message])
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



32
33
34
# File 'lib/flexmls_api/response.rb', line 32

def code
  @code
end

#detailsObject (readonly)

Returns the value of attribute details.



32
33
34
# File 'lib/flexmls_api/response.rb', line 32

def details
  @details
end

#statusObject (readonly)

Returns the value of attribute status.



32
33
34
# File 'lib/flexmls_api/response.rb', line 32

def status
  @status
end