Module: Eye::Controller::Apply

Included in:
Eye::Controller
Defined in:
lib/eye/controller/apply.rb

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Instance Method Details

#apply(masks, call) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/eye/controller/apply.rb', line 3

def apply(masks, call)
  res = matched_objects(*masks) do |obj|
    if call[:command].to_sym == :delete
      remove_object_from_tree(obj)
      set_proc_line
    end
  end

  objs = res.delete(:objects)
  async.apply_to_objects(objs, call) if objs
  res
end

#match(*args) ⇒ Object



16
17
18
# File 'lib/eye/controller/apply.rb', line 16

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