mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2025-04-11 07:23:45 +01:00
Compare commits
3 Commits
7e580dc91a
...
662f14282f
Author | SHA1 | Date | |
---|---|---|---|
662f14282f | |||
2e0e584d3a | |||
a8425cf7cd |
13
lib/obsws.rb
13
lib/obsws.rb
@ -25,19 +25,12 @@ module OBSWS
|
|||||||
class OBSWSRequestError < OBSWSError
|
class OBSWSRequestError < OBSWSError
|
||||||
attr_reader :req_name, :code
|
attr_reader :req_name, :code
|
||||||
|
|
||||||
def initialize(req_name, code, msg)
|
def initialize(req_name, code, comment)
|
||||||
@req_name = req_name
|
@req_name = req_name
|
||||||
@code = code
|
@code = code
|
||||||
@msg = msg
|
message = "Request #{@req_name} returned code #{@code}."
|
||||||
|
message << " With message: #{comment}" if comment
|
||||||
super(message)
|
super(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def message
|
|
||||||
msg = [
|
|
||||||
"Request #{@req_name} returned code #{@code}."
|
|
||||||
]
|
|
||||||
msg << "With message: #{@msg}" if @msg
|
|
||||||
msg.join(" ")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -29,8 +29,8 @@ module OBSWS
|
|||||||
port = kwargs[:port] || 4455
|
port = kwargs[:port] || 4455
|
||||||
@password = kwargs[:password] || ""
|
@password = kwargs[:password] || ""
|
||||||
@subs = kwargs[:subs] || 0
|
@subs = kwargs[:subs] || 0
|
||||||
setup_driver(host, port) and start_driver
|
|
||||||
@identified = Identified.new
|
@identified = Identified.new
|
||||||
|
setup_driver(host, port) and start_driver
|
||||||
WaitUtil.wait_for_condition(
|
WaitUtil.wait_for_condition(
|
||||||
"successful identification",
|
"successful identification",
|
||||||
delay_sec: 0.01,
|
delay_sec: 0.01,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user