Module: RBS::Test::Observer
Relationships & Source Files | |
Defined in: | lib/rbs/test/observer.rb |
Class Method Summary
Class Method Details
.notify(key, *args)
[ GitHub ]# File 'lib/rbs/test/observer.rb', line 7
def notify(key, *args) @@observers[key]&.call(*args) end
.register(key, object = nil, &block)
[ GitHub ]# File 'lib/rbs/test/observer.rb', line 11
def register(key, object = nil, &block) @@observers[key] = object || block end