123456789_123456789_123456789_123456789_123456789_

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 9

def notify(key, *args)
  @@observers[key]&.call(*args)
end

.register(key, object = nil, &block)

[ GitHub ]

  
# File 'lib/rbs/test/observer.rb', line 13

def register(key, object = nil, &block)
  @@observers[key] = object || block
end