u-case 2.6.0 → 3.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,44 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Micro
4
- class Case
5
- class Safe
6
- module Flow
7
- def self.included(base)
8
- base.send(:include, ::Micro::Case::Flow)
9
-
10
- def base.flow_reducer; Reducer; end
11
- end
12
-
13
- class Reducer < ::Micro::Case::Flow::Reducer
14
- alias_method :&, :>>
15
-
16
- def >>(arg)
17
- raise NoMethodError, "undefined method `>>' for #{self.inspect}. Please, use the method `&' to avoid this error."
18
- end
19
-
20
- private
21
-
22
- def next_use_case_result(use_case, result, input)
23
- begin
24
- instance = use_case.__new__(result, input)
25
- instance.call
26
- rescue => exception
27
- raise exception if Error::ByWrongUsage.check(exception)
28
-
29
- result.__set__(false, exception, :exception, instance)
30
- end
31
- end
32
- end
33
- end
34
-
35
- def self.Flow(args)
36
- Flow::Reducer.build(Array(args))
37
- end
38
-
39
- def self.__flow_reducer
40
- Flow::Reducer
41
- end
42
- end
43
- end
44
- end
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- warn 'Deprecation: "u-case/with_validation" will be deprecated in the next major release.' \
4
- 'Please use "u-case/with_activemodel_validation" instead of it.'
5
-
6
- require 'u-case/with_activemodel_validation'