lib/eco/api/usecases/use_case_chain.rb in eco-helpers-0.8.3 vs lib/eco/api/usecases/use_case_chain.rb in eco-helpers-0.8.4
- old
+ new
@@ -3,22 +3,22 @@
module UseCases
class UseCaseChain < UseCase
MAX_CHAINS = 70
@@num_chains = 0
- def initialize(name, type:, root:, options: {}, &block)
- super(name, type: type, root: root, options: options, &block)
+ def initialize(name, type:, root:, &block)
+ super(name, type: type, root: root, &block)
@chains = []
@resolved_chains = nil
end
def root=(value)
raise "You cannot change root UseGroup once the chains have been resolved" if @resolved_chains
super(value)
end
def use(preserve_chains: false, recursive: false)
- UseCase.new(@name, type: @type, root: @root, options: @options, &@case).tap do |newcase|
+ UseCase.new(@name, type: @type, root: @root, &@case).tap do |newcase|
if preserve_chains
chain_use = {preserve_chains: recursive, recursive: recursive}
@chains = @chains.map do |usecase|
if usecase.respond_to? :call
Proc.new do |usegroup|