Module: InitializerEnhancer

Included in:
SillyMonkey
Defined in:
lib/celluloid-io-pg-listener/examples/double_super_example.rb

Instance Method Summary collapse

Instance Method Details

#initialize(callback_method:) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/celluloid-io-pg-listener/examples/double_super_example.rb', line 3

def initialize(callback_method:)
  # Class including this one must define the callback method
  define_singleton_method(callback_method) {
    super("banana") # <- Works just like you hoped it would.
  }
  super()
end