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

Instance Method Details

#match(*args) ⇒ Object



15
16
17
# File 'lib/eye/controller/send_command.rb', line 15

def match(*args)
  matched_objects(*args)
end

#send_command(command, *args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# 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
    end

    obj.send_command(command)
  end
end

#signal(signal, *args) ⇒ Object



19
20
21
22
23
# File 'lib/eye/controller/send_command.rb', line 19

def signal(signal, *args)
  matched_objects(*args) do |obj|
    obj.send_command :signal, signal || 0
  end
end