Module: Eye::Controller::SendCommand
- Included in:
- Eye::Controller
- Defined in:
- lib/eye/controller/send_command.rb
Instance Method Summary collapse
- #break_chain(*obj_strs) ⇒ Object
- #match(*obj_strs) ⇒ Object
- #send_command(command, *obj_strs) ⇒ Object
- #signal(sig, *obj_strs) ⇒ Object
Instance Method Details
#break_chain(*obj_strs) ⇒ Object
24 25 26 27 28 |
# File 'lib/eye/controller/send_command.rb', line 24 def break_chain(*obj_strs) matched_objects(*obj_strs) do |obj| obj.send_command(:break_chain) end end |
#match(*obj_strs) ⇒ Object
14 15 16 |
# File 'lib/eye/controller/send_command.rb', line 14 def match(*obj_strs) matched_objects(*obj_strs) end |
#send_command(command, *obj_strs) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/eye/controller/send_command.rb', line 3 def send_command(command, *obj_strs) matched_objects(*obj_strs) do |obj| if command.to_sym == :delete remove_object_from_tree(obj) set_proc_line # to sync proc line if was delete application end obj.send_command(command) end end |
#signal(sig, *obj_strs) ⇒ Object
18 19 20 21 22 |
# File 'lib/eye/controller/send_command.rb', line 18 def signal(sig, *obj_strs) matched_objects(*obj_strs) do |obj| obj.send_command :signal, sig || 0 end end |