lib/attr/gather/workflow/dsl.rb in attr-gather-1.1.3 vs lib/attr/gather/workflow/dsl.rb in attr-gather-1.2.0

- old
+ new

@@ -34,12 +34,12 @@ # # @yield [Attr::Gather::Workflow::Task] A task to configure # # @api public def task(task_name, opts = EMPTY_HASH) - task = Task.new(name: task_name, **opts) - yield task - tasks << task + conf = OpenStruct.new + yield conf + tasks << Hash[name: task_name, **opts, **conf.to_h] self end # Defines a container for task dependencies #