Exception: RubstApi::WebSocketException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, reason: nil) ⇒ WebSocketException

Returns a new instance of WebSocketException.



25
26
27
28
# File 'lib/rubst_api/errors.rb', line 25

def initialize(code:, reason: nil)
  @code, @reason = code, reason
  super(reason)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



24
25
26
# File 'lib/rubst_api/errors.rb', line 24

def code
  @code
end

#reasonObject (readonly)

Returns the value of attribute reason.



24
25
26
# File 'lib/rubst_api/errors.rb', line 24

def reason
  @reason
end