Class: Async::Runnner::Strategy::Base
- Inherits:
-
Object
- Object
- Async::Runnner::Strategy::Base
- Defined in:
- lib/async/runner.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(block) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(block) ⇒ Base
Returns a new instance of Base.
37 38 39 |
# File 'lib/async/runner.rb', line 37 def initialize(block) @block = block end |
Class Method Details
.spawn(block) ⇒ Object
31 32 33 34 35 |
# File 'lib/async/runner.rb', line 31 def self.spawn(block) instance = new(block) instance.run! instance end |