Class: Conquer::Dzen::Interaction::CallbackListener
- Inherits:
-
Object
- Object
- Conquer::Dzen::Interaction::CallbackListener
- Includes:
- Celluloid, Celluloid::Notifications
- Defined in:
- lib/conquer/dzen/interaction/callback_listener.rb
Instance Method Summary collapse
-
#initialize ⇒ CallbackListener
constructor
A new instance of CallbackListener.
- #run_callback(_, callback, *args) ⇒ Object
Constructor Details
#initialize ⇒ CallbackListener
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 |