Class: Conquer::Dzen::Interaction::CallbackListener

Inherits:
Object
  • Object
show all
Includes:
Celluloid, Celluloid::Notifications
Defined in:
lib/conquer/dzen/interaction/callback_listener.rb

Instance Method Summary collapse

Constructor Details

#initializeCallbackListener

Returns a new instance of CallbackListener.



10
11
12
# File 'lib/conquer/dzen/interaction/callback_listener.rb', line 10

def initialize
  subscribe('button', :run_callback)
end

Instance Method Details

#run_callback(_, callback, *args) ⇒ Object



14
15
16
17
18
# File 'lib/conquer/dzen/interaction/callback_listener.rb', line 14

def run_callback(_, callback, *args)
  Celluloid::Future.new do
    Helpers.send(callback, *args)
  end
end