Class: Awt::Task
- Inherits:
-
Object
- Object
- Awt::Task
- Defined in:
- lib/awt/task.rb
Instance Method Summary collapse
- #exec(targets) ⇒ Object
-
#initialize(&block) ⇒ Task
constructor
A new instance of Task.
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 |