Exception: OBSWS::OBSWSRequestError

Inherits:
OBSWSError
  • Object
show all
Defined in:
lib/obsws.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(req_name, code, msg) ⇒ OBSWSRequestError

Returns a new instance of OBSWSRequestError.



28
29
30
31
32
33
# File 'lib/obsws.rb', line 28

def initialize(req_name, code, msg)
  @req_name = req_name
  @code = code
  @msg = msg
  super(message)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



26
27
28
# File 'lib/obsws.rb', line 26

def code
  @code
end

#req_nameObject (readonly)

Returns the value of attribute req_name.



26
27
28
# File 'lib/obsws.rb', line 26

def req_name
  @req_name
end

Instance Method Details

#messageObject



35
36
37
38
39
40
41
# File 'lib/obsws.rb', line 35

def message
  msg = [
    "Request #{@req_name} returned code #{@code}."
  ]
  msg << "With message: #{@msg}" if @msg
  msg.join(" ")
end