lib/micro/case/safe/flow.rb in u-case-2.0.0.pre.2 vs lib/micro/case/safe/flow.rb in u-case-2.0.0.pre.3
- old
+ new
@@ -8,14 +8,10 @@
base.send(:include, ::Micro::Case::Flow)
def base.flow_reducer; Reducer; end
end
- def self.Flow(args)
- Reducer.build(Array(args))
- end
-
class Reducer < ::Micro::Case::Flow::Reducer
def call(arg = {})
@use_cases.reduce(initial_result(arg)) do |result, use_case|
break result if result.failure?
@@ -40,9 +36,13 @@
result.__set__(false, exception, :exception, instance)
end
end
end
+ end
+
+ def self.Flow(args)
+ Flow::Reducer.build(Array(args))
end
end
end
end