mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2024-11-15 18:50:47 +00:00
minor syntax changes
This commit is contained in:
parent
e4f4961c56
commit
86b84aeef9
@ -42,7 +42,7 @@ module OBSWS
|
||||
end
|
||||
|
||||
def add_observer(observer)
|
||||
observer = [observer] if !observer.respond_to? :each
|
||||
observer = [observer] unless observer.respond_to? :each
|
||||
observer.each { |o| observers << o unless observers.include? o }
|
||||
end
|
||||
|
||||
|
@ -47,12 +47,12 @@ module OBSWS
|
||||
delay_sec: 0.001,
|
||||
timeout_sec: 3
|
||||
) { @response[:requestId] == id }
|
||||
if !@response[:requestStatus][:result]
|
||||
unless @response[:requestStatus][:result]
|
||||
error = [
|
||||
"Request #{@response[:requestType]} returned code #{@response[:requestStatus][:code]}"
|
||||
]
|
||||
if @response[:requestStatus].key?(:comment)
|
||||
error += ["With message: #{@response[:requestStatus][:comment]}"]
|
||||
error << ["With message: #{@response[:requestStatus][:comment]}"]
|
||||
end
|
||||
raise OBSWSError.new(error.join("\n"))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user