Module: Dry::Monads::Task::Mixin
- Includes:
- Constructors
- Defined in:
- lib/dry/monads/task.rb
Overview
Task constructors.
Defined Under Namespace
Modules: Constructors
Constant Summary collapse
Class Method Summary collapse
-
.[](executor) ⇒ Module
Created a mixin with the given executor injected.
Methods included from Constructors
Class Method Details
.[](executor) ⇒ Module
Created a mixin with the given executor injected.
285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/dry/monads/task.rb', line 285 def self.[](executor) Module.new do include Mixin # Created a new Task with an injected executor. # # @param block [Proc] # @return [Task] define_method(:Task) do |&block| Task[executor, &block] end end end |