Module: Eye::Group::Call
- Included in:
- Eye::Group
- Defined in:
- lib/eye/group/call.rb
Instance Method Summary collapse
- #break_chain ⇒ Object
- #delete ⇒ Object
- #monitor ⇒ Object
- #restart ⇒ Object
-
#send_call(call) ⇒ Object
:update_config, :start, :stop, :restart, :unmonitor, :monitor, :break_chain, :delete, :signal, :user_command.
- #signal(sig) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #unmonitor ⇒ Object
- #update_config(cfg) ⇒ Object
- #user_command(cmd) ⇒ Object
Instance Method Details
#break_chain ⇒ Object
55 56 57 58 59 |
# File 'lib/eye/group/call.rb', line 55 def break_chain info 'break chain' scheduler_clear_pending_list @chain_breaker = true end |
#delete ⇒ Object
34 35 36 37 |
# File 'lib/eye/group/call.rb', line 34 def delete fast_call command: :delete terminate end |
#monitor ⇒ Object
39 40 41 |
# File 'lib/eye/group/call.rb', line 39 def monitor chained_call command: :monitor end |
#restart ⇒ Object
30 31 32 |
# File 'lib/eye/group/call.rb', line 30 def restart chained_call command: :restart end |
#send_call(call) ⇒ Object
:update_config, :start, :stop, :restart, :unmonitor, :monitor, :break_chain, :delete, :signal, :user_command
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/eye/group/call.rb', line 4 def send_call(call) info "call: #{call[:method]}" case call[:command] when :delete delete when :break_chain break_chain else user_schedule(call) end end |
#signal(sig) ⇒ Object
47 48 49 |
# File 'lib/eye/group/call.rb', line 47 def signal(sig) fast_call command: :signal, args: [sig] end |
#start ⇒ Object
22 23 24 |
# File 'lib/eye/group/call.rb', line 22 def start chained_call command: :start end |
#stop ⇒ Object
26 27 28 |
# File 'lib/eye/group/call.rb', line 26 def stop fast_call command: :stop end |
#unmonitor ⇒ Object
43 44 45 |
# File 'lib/eye/group/call.rb', line 43 def unmonitor fast_call command: :unmonitor end |
#update_config(cfg) ⇒ Object
17 18 19 20 |
# File 'lib/eye/group/call.rb', line 17 def update_config(cfg) @config = cfg @full_name = nil end |
#user_command(cmd) ⇒ Object
51 52 53 |
# File 'lib/eye/group/call.rb', line 51 def user_command(cmd) fast_call command: :user_command, args: [cmd] end |