Compare commits

..

No commits in common. "46bfb53db88535c5b08b430da4dc77d3cdf7c3f7" and "aeec0635ca0bad7126acff97c2e26834ee24669d" have entirely different histories.

3 changed files with 7 additions and 9 deletions

View File

@ -47,11 +47,10 @@ module OBSWS
end
def remove_observer(observer)
observer = [observer] unless observer.respond_to? :each
observers.reject! { |o| observer.include? o }
observers.delete(observer)
end
private def notify_observers(event, data)
def notify_observers(event, data)
observers.each do |o|
if o.is_a? Method
if o.name.to_s == "on_#{snakecase(event)}"
@ -63,7 +62,6 @@ module OBSWS
end
end
alias_method :callbacks, :observers
alias_method :register, :add_observer
alias_method :deregister, :remove_observer
end

View File

@ -26,11 +26,11 @@ module OBSWS
def attrs = @fields.map { |f| snakecase(f.to_s) }
end
class Response < MetaObject; end
# Represents a request response object
class Response < MetaObject
end
class Data < MetaObject; end
# Represents an event data object
class Data < MetaObject
end
module TearDown
def stop_driver

View File

@ -11,7 +11,7 @@ module OBSWS
end
def patch
1
0
end
def to_a