Module: Eye::Controller::SendCommand
- Included in:
- Eye::Controller
- Defined in:
- lib/eye/controller/send_command.rb
Defined Under Namespace
Classes: Error
Instance Method Summary collapse
- #break_chain(*args) ⇒ Object
- #match(*args) ⇒ Object
- #send_command(command, *args) ⇒ Object
- #signal(signal, *args) ⇒ Object
Instance Method Details
#break_chain(*args) ⇒ Object
26 27 28 29 30 |
# File 'lib/eye/controller/send_command.rb', line 26 def break_chain(*args) matched_objects(*args) do |obj| obj.send_command(:break_chain) end end |
#match(*args) ⇒ Object
16 17 18 |
# File 'lib/eye/controller/send_command.rb', line 16 def match(*args) matched_objects(*args) end |
#send_command(command, *args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/eye/controller/send_command.rb', line 3 def send_command(command, *args) matched_objects(*args) do |obj| if command.to_sym == :delete remove_object_from_tree(obj) set_proc_line save_cache end obj.send_command(command) end end |
#signal(signal, *args) ⇒ Object
20 21 22 23 24 |
# File 'lib/eye/controller/send_command.rb', line 20 def signal(signal, *args) matched_objects(*args) do |obj| obj.send_command :signal, signal || 0 end end |