Class: Awt::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/awt/task.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Task

Returns a new instance of Task.



3
4
5
# File 'lib/awt/task.rb', line 3

def initialize(&block)
  @block = block
end

Instance Method Details

#exec(targets) ⇒ Object



7
8
9
10
11
# File 'lib/awt/task.rb', line 7

def exec(targets)
  targets.each do |target|
    target.instance_eval &@block
  end
end