Module: Conquer::Dzen::Interaction
- Included in:
- Helpers
- Defined in:
- lib/conquer/dzen/interaction.rb,
lib/conquer/dzen/interaction/tooltip_listener.rb,
lib/conquer/dzen/interaction/callback_listener.rb
Defined Under Namespace
Classes: CallbackListener, TooltipListener
Instance Method Summary
collapse
Instance Method Details
11
12
13
14
15
|
# File 'lib/conquer/dzen/interaction.rb', line 11
def button(button, callback, *args)
rpc_call = { method: :event, params: ['button', callback, *args] }
command = "echo -n '#{rpc_call.to_json}' | socat stdin '#{RPC_SOCKET}'"
"^ca(#{button}, #{command})#{yield}^ca()"
end
|
7
8
9
|
# File 'lib/conquer/dzen/interaction.rb', line 7
def show_tooltip(*args)
Celluloid.publish('tooltip', *args)
end
|