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.
273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/dry/monads/task.rb', line 273 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 |