Class: Shouter::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/shouter/builder.rb

Class Method Summary collapse

Class Method Details

.register(object, options) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/shouter/builder.rb', line 4

def register(object, options)
  if options[:async]
    _klass = Shouter::Listeners::Async
  else
    _klass = Shouter::Listeners::Sync
  end
  _klass.new(object, options)
end