servactory 2.6.0.rc4 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/en.yml +6 -3
- data/config/locales/ru.yml +6 -3
- data/lib/servactory/configuration/actions/aliases/collection.rb +18 -0
- data/lib/servactory/configuration/actions/rescue_handlers/collection.rb +18 -0
- data/lib/servactory/configuration/actions/shortcuts/collection.rb +18 -0
- data/lib/servactory/configuration/collection_mode/class_names_collection.rb +16 -0
- data/lib/servactory/configuration/dsl.rb +2 -0
- data/lib/servactory/configuration/factory.rb +4 -0
- data/lib/servactory/{maintenance → configuration}/hash_mode/class_names_collection.rb +1 -1
- data/lib/servactory/{maintenance/attributes → configuration/option_helpers}/option_helpers_collection.rb +2 -2
- data/lib/servactory/configuration/setup.rb +18 -10
- data/lib/servactory/test_kit/rspec/matchers/have_service_input_matchers/valid_with_matcher.rb +4 -1
- data/lib/servactory/tool_kit/dynamic_options/consists_of.rb +35 -13
- data/lib/servactory/version.rb +1 -1
- metadata +8 -7
- data/lib/servactory/actions/aliases/collection.rb +0 -16
- data/lib/servactory/actions/rescue_handlers/collection.rb +0 -16
- data/lib/servactory/actions/shortcuts/collection.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0df96b35bd963790408ba89eb4c6d80b7b19c4edc869ceade70f0d9d660f41ce
|
4
|
+
data.tar.gz: 97c287969f8358a77903d17b79624b59a06abd8aa94aa469e5d458f99ae50342
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57caa41f80f9df2fa40061dad1337839dfba5dcc69b54e44ac8651bb83ec4e4d034870e7cd78f1d23661cd4ab66153904ed9679e78253a91e5532a7c596f4f11
|
7
|
+
data.tar.gz: 9e85fcb8bd9994756b6d9519d1a2bbbc68a7bd13254505ae4930552d377a011eb233d70e7fe9abdb23cc52d0f8812294bfb70ce15b5f34b6861cbf763c918461
|
data/config/locales/en.yml
CHANGED
@@ -20,7 +20,8 @@ en:
|
|
20
20
|
dynamic_options:
|
21
21
|
consists_of:
|
22
22
|
required: "[%{service_class_name}] Required element in input collection `%{input_name}` is missing"
|
23
|
-
wrong_type: "[%{service_class_name}] Wrong
|
23
|
+
wrong_type: "[%{service_class_name}] Wrong input collection type `%{input_name}`, expected `%{expected_type}`, got `%{given_type}`"
|
24
|
+
wrong_element_type: "[%{service_class_name}] Wrong element type in input collection `%{input_name}`, expected `%{expected_type}`, got `%{given_type}`"
|
24
25
|
format:
|
25
26
|
default: "[%{service_class_name}] Input `%{input_name}` does not match `%{format_name}` format"
|
26
27
|
wrong_pattern: "[%{service_class_name}] Input `%{input_name}` does not match `%{format_name}` format"
|
@@ -55,7 +56,8 @@ en:
|
|
55
56
|
dynamic_options:
|
56
57
|
consists_of:
|
57
58
|
required: "[%{service_class_name}] Required element in internal attribute collection `%{internal_name}` is missing"
|
58
|
-
wrong_type: "[%{service_class_name}] Wrong
|
59
|
+
wrong_type: "[%{service_class_name}] Wrong internal attribute collection type `%{internal_name}`, expected `%{expected_type}`, got `%{given_type}`"
|
60
|
+
wrong_element_type: "[%{service_class_name}] Wrong element type in internal attribute collection `%{internal_name}`, expected `%{expected_type}`, got `%{given_type}`"
|
59
61
|
format:
|
60
62
|
default: "[%{service_class_name}] Internal attribute `%{internal_name}` does not match `%{format_name}` format"
|
61
63
|
wrong_pattern: "[%{service_class_name}] Internal attribute `%{internal_name}` does not match `%{format_name}` format"
|
@@ -82,7 +84,8 @@ en:
|
|
82
84
|
dynamic_options:
|
83
85
|
consists_of:
|
84
86
|
required: "[%{service_class_name}] Required element in output attribute collection `%{output_name}` is missing"
|
85
|
-
wrong_type: "[%{service_class_name}] Wrong
|
87
|
+
wrong_type: "[%{service_class_name}] Wrong output attribute collection type `%{output_name}`, expected `%{expected_type}`, got `%{given_type}`"
|
88
|
+
wrong_element_type: "[%{service_class_name}] Wrong element type in output attribute collection `%{output_name}`, expected `%{expected_type}`, got `%{given_type}`"
|
86
89
|
format:
|
87
90
|
default: "[%{service_class_name}] Output attribute `%{output_name}` does not match `%{format_name}` format"
|
88
91
|
wrong_pattern: "[%{service_class_name}] Output attribute `%{output_name}` does not match `%{format_name}` format"
|
data/config/locales/ru.yml
CHANGED
@@ -20,7 +20,8 @@ ru:
|
|
20
20
|
dynamic_options:
|
21
21
|
consists_of:
|
22
22
|
required: "[%{service_class_name}] Отсутствует обязательный элемент в коллекции инпута `%{input_name}`"
|
23
|
-
wrong_type: "[%{service_class_name}] Неправильный тип
|
23
|
+
wrong_type: "[%{service_class_name}] Неправильный тип коллекции инпута `%{input_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
|
24
|
+
wrong_element_type: "[%{service_class_name}] Неправильный тип элемента в коллекции инпута `%{input_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
|
24
25
|
format:
|
25
26
|
default: "[%{service_class_name}] Инпут `%{input_name}` не соответствует формату `%{format_name}`"
|
26
27
|
wrong_pattern: "[%{service_class_name}] Инпут `%{input_name}` не соответствует формату `%{format_name}`"
|
@@ -55,7 +56,8 @@ ru:
|
|
55
56
|
dynamic_options:
|
56
57
|
consists_of:
|
57
58
|
required: "[%{service_class_name}] Отсутствует обязательный элемент в коллекции внутреннего атрибута `%{internal_name}`"
|
58
|
-
wrong_type: "[%{service_class_name}] Неправильный тип
|
59
|
+
wrong_type: "[%{service_class_name}] Неправильный тип коллекции внутреннего атрибута `%{internal_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
|
60
|
+
wrong_element_type: "[%{service_class_name}] Неправильный тип элемента в коллекции внутреннего атрибута `%{internal_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
|
59
61
|
format:
|
60
62
|
default: "[%{service_class_name}] Внутренний атрибут `%{internal_name}` не соответствует формату `%{format_name}`"
|
61
63
|
wrong_pattern: "[%{service_class_name}] Внутренний атрибут `%{internal_name}` не соответствует формату `%{format_name}`"
|
@@ -82,7 +84,8 @@ ru:
|
|
82
84
|
dynamic_options:
|
83
85
|
consists_of:
|
84
86
|
required: "[%{service_class_name}] Отсутствует обязательный элемент в коллекции выходящего атрибута `%{output_name}`"
|
85
|
-
wrong_type: "[%{service_class_name}] Неправильный тип
|
87
|
+
wrong_type: "[%{service_class_name}] Неправильный тип коллекции выходящего атрибута `%{output_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
|
88
|
+
wrong_element_type: "[%{service_class_name}] Неправильный тип элемента в коллекции выходящего атрибута `%{output_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
|
86
89
|
format:
|
87
90
|
default: "[%{service_class_name}] Выходящий атрибут `%{output_name}` не соответствует формату `%{format_name}`"
|
88
91
|
wrong_pattern: "[%{service_class_name}] Выходящий атрибут `%{output_name}` не соответствует формату `%{format_name}`"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Servactory
|
4
|
+
module Configuration
|
5
|
+
module Actions
|
6
|
+
module Aliases
|
7
|
+
class Collection
|
8
|
+
extend Forwardable
|
9
|
+
def_delegators :@collection, :<<, :merge, :include?
|
10
|
+
|
11
|
+
def initialize(*)
|
12
|
+
@collection = Set.new
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Servactory
|
4
|
+
module Configuration
|
5
|
+
module Actions
|
6
|
+
module RescueHandlers
|
7
|
+
class Collection
|
8
|
+
extend Forwardable
|
9
|
+
def_delegators :@collection, :+, :detect, :reverse_each
|
10
|
+
|
11
|
+
def initialize(*)
|
12
|
+
@collection = Set.new
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Servactory
|
4
|
+
module Configuration
|
5
|
+
module Actions
|
6
|
+
module Shortcuts
|
7
|
+
class Collection
|
8
|
+
extend Forwardable
|
9
|
+
def_delegators :@collection, :<<, :each, :merge, :include?
|
10
|
+
|
11
|
+
def initialize(*)
|
12
|
+
@collection = Set.new
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Servactory
|
4
|
+
module Configuration
|
5
|
+
module CollectionMode
|
6
|
+
class ClassNamesCollection
|
7
|
+
extend Forwardable
|
8
|
+
def_delegators :@collection, :merge, :intersection
|
9
|
+
|
10
|
+
def initialize(collection)
|
11
|
+
@collection = collection
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -20,6 +20,8 @@ module Servactory
|
|
20
20
|
|
21
21
|
child.config.result_class = config.result_class
|
22
22
|
|
23
|
+
child.config.collection_mode_class_names = config.collection_mode_class_names
|
24
|
+
|
23
25
|
child.config.input_option_helpers = config.input_option_helpers
|
24
26
|
child.config.internal_option_helpers = config.internal_option_helpers
|
25
27
|
child.config.output_option_helpers = config.output_option_helpers
|
@@ -69,6 +69,10 @@ module Servactory
|
|
69
69
|
raise_error_about_wrong_result_class_with(:result_class, result_class)
|
70
70
|
end
|
71
71
|
|
72
|
+
def collection_mode_class_names(collection_mode_class_names)
|
73
|
+
@config.collection_mode_class_names.merge(collection_mode_class_names)
|
74
|
+
end
|
75
|
+
|
72
76
|
def hash_mode_class_names(hash_mode_class_names)
|
73
77
|
@config.hash_mode_class_names.merge(hash_mode_class_names)
|
74
78
|
end
|
@@ -9,6 +9,7 @@ module Servactory
|
|
9
9
|
:success_class,
|
10
10
|
:failure_class,
|
11
11
|
:result_class,
|
12
|
+
:collection_mode_class_names,
|
12
13
|
:hash_mode_class_names,
|
13
14
|
:input_option_helpers,
|
14
15
|
:internal_option_helpers,
|
@@ -29,21 +30,24 @@ module Servactory
|
|
29
30
|
|
30
31
|
@result_class = Servactory::Result
|
31
32
|
|
33
|
+
@collection_mode_class_names =
|
34
|
+
Servactory::Configuration::CollectionMode::ClassNamesCollection.new(default_collection_mode_class_names)
|
35
|
+
|
32
36
|
@hash_mode_class_names =
|
33
|
-
Servactory::
|
37
|
+
Servactory::Configuration::HashMode::ClassNamesCollection.new(default_hash_mode_class_names)
|
34
38
|
|
35
39
|
@input_option_helpers =
|
36
|
-
Servactory::
|
40
|
+
Servactory::Configuration::OptionHelpers::OptionHelpersCollection.new(default_input_option_helpers)
|
37
41
|
|
38
42
|
@internal_option_helpers =
|
39
|
-
Servactory::
|
43
|
+
Servactory::Configuration::OptionHelpers::OptionHelpersCollection.new(default_internal_option_helpers)
|
40
44
|
|
41
45
|
@output_option_helpers =
|
42
|
-
Servactory::
|
46
|
+
Servactory::Configuration::OptionHelpers::OptionHelpersCollection.new(default_output_option_helpers)
|
43
47
|
|
44
|
-
@action_aliases = Servactory::Actions::Aliases::Collection.new
|
45
|
-
@action_shortcuts = Servactory::Actions::Shortcuts::Collection.new
|
46
|
-
@action_rescue_handlers = Servactory::Actions::RescueHandlers::Collection.new
|
48
|
+
@action_aliases = Servactory::Configuration::Actions::Aliases::Collection.new
|
49
|
+
@action_shortcuts = Servactory::Configuration::Actions::Shortcuts::Collection.new
|
50
|
+
@action_rescue_handlers = Servactory::Configuration::Actions::RescueHandlers::Collection.new
|
47
51
|
|
48
52
|
@i18n_root_key = "servactory"
|
49
53
|
|
@@ -56,6 +60,10 @@ module Servactory
|
|
56
60
|
|
57
61
|
private
|
58
62
|
|
63
|
+
def default_collection_mode_class_names
|
64
|
+
Set[Array, Set]
|
65
|
+
end
|
66
|
+
|
59
67
|
def default_hash_mode_class_names
|
60
68
|
Set[Hash]
|
61
69
|
end
|
@@ -63,19 +71,19 @@ module Servactory
|
|
63
71
|
def default_input_option_helpers
|
64
72
|
Set[
|
65
73
|
Servactory::Maintenance::Attributes::OptionHelper.new(name: :optional, equivalent: { required: false }),
|
66
|
-
Servactory::ToolKit::DynamicOptions::ConsistsOf.
|
74
|
+
Servactory::ToolKit::DynamicOptions::ConsistsOf.use(collection_mode_class_names: collection_mode_class_names)
|
67
75
|
]
|
68
76
|
end
|
69
77
|
|
70
78
|
def default_internal_option_helpers
|
71
79
|
Set[
|
72
|
-
Servactory::ToolKit::DynamicOptions::ConsistsOf.
|
80
|
+
Servactory::ToolKit::DynamicOptions::ConsistsOf.use(collection_mode_class_names: collection_mode_class_names)
|
73
81
|
]
|
74
82
|
end
|
75
83
|
|
76
84
|
def default_output_option_helpers
|
77
85
|
Set[
|
78
|
-
Servactory::ToolKit::DynamicOptions::ConsistsOf.
|
86
|
+
Servactory::ToolKit::DynamicOptions::ConsistsOf.use(collection_mode_class_names: collection_mode_class_names)
|
79
87
|
]
|
80
88
|
end
|
81
89
|
end
|
data/lib/servactory/test_kit/rspec/matchers/have_service_input_matchers/valid_with_matcher.rb
CHANGED
@@ -142,10 +142,13 @@ module Servactory
|
|
142
142
|
value: wrong_value
|
143
143
|
)
|
144
144
|
elsif input_required_message.is_a?(Proc)
|
145
|
+
service_class = Struct.new(:class_name, keyword_init: true)
|
146
|
+
service = service_class.new(class_name: described_class.name)
|
147
|
+
|
145
148
|
input_work = attribute_data.fetch(:work)
|
146
149
|
|
147
150
|
input_required_message = input_required_message.call(
|
148
|
-
|
151
|
+
service: service,
|
149
152
|
input: input_work,
|
150
153
|
value: wrong_value
|
151
154
|
)
|
@@ -4,11 +4,14 @@ module Servactory
|
|
4
4
|
module ToolKit
|
5
5
|
module DynamicOptions
|
6
6
|
class ConsistsOf < Must
|
7
|
-
|
8
|
-
|
7
|
+
def self.use(option_name = :consists_of, collection_mode_class_names:)
|
8
|
+
instance = new(option_name, :type, false)
|
9
|
+
instance.assign(collection_mode_class_names)
|
10
|
+
instance.must(:consists_of)
|
11
|
+
end
|
9
12
|
|
10
|
-
def
|
11
|
-
|
13
|
+
def assign(collection_mode_class_names)
|
14
|
+
@collection_mode_class_names = collection_mode_class_names
|
12
15
|
end
|
13
16
|
|
14
17
|
def condition_for_input_with(input:, value:, option:)
|
@@ -25,22 +28,39 @@ module Servactory
|
|
25
28
|
|
26
29
|
def common_condition_with(attribute:, value:, option:)
|
27
30
|
return true if option.value == false
|
28
|
-
return false if
|
29
|
-
|
31
|
+
return [false, :wrong_type] if @collection_mode_class_names.intersection(attribute.types).empty?
|
32
|
+
|
33
|
+
values = value.respond_to?(:flatten) ? value&.flatten : value
|
30
34
|
|
31
|
-
validate_for!(values:
|
35
|
+
validate_for!(attribute: attribute, values: values, option: option)
|
32
36
|
end
|
33
37
|
|
34
|
-
def validate_for!(values:, option:)
|
38
|
+
def validate_for!(attribute:, values:, option:)
|
35
39
|
consists_of_types = Array(option.value)
|
36
40
|
|
37
|
-
|
41
|
+
if fails_presence_validation?(attribute: attribute, values: values, consists_of_types: consists_of_types)
|
42
|
+
return [false, :required]
|
43
|
+
end
|
38
44
|
|
39
|
-
return true if values.
|
45
|
+
return true if values.blank? && attribute.input? && attribute.optional?
|
46
|
+
|
47
|
+
return true if values.all? do |value|
|
40
48
|
consists_of_types.include?(value.class)
|
41
49
|
end
|
42
50
|
|
43
|
-
[false, :
|
51
|
+
[false, :wrong_element_type]
|
52
|
+
end
|
53
|
+
|
54
|
+
def fails_presence_validation?(attribute:, values:, consists_of_types:)
|
55
|
+
return false if consists_of_types.include?(NilClass)
|
56
|
+
|
57
|
+
check_present = proc { _1 && !values.all?(&:present?) }
|
58
|
+
|
59
|
+
[
|
60
|
+
check_present[attribute.input? && (attribute.required? || (attribute.optional? && values.present?))],
|
61
|
+
check_present[attribute.internal?],
|
62
|
+
check_present[attribute.output?]
|
63
|
+
].any?
|
44
64
|
end
|
45
65
|
|
46
66
|
########################################################################
|
@@ -85,9 +105,11 @@ module Servactory
|
|
85
105
|
end
|
86
106
|
|
87
107
|
def given_type_for(values:, option_value:)
|
88
|
-
return
|
108
|
+
return "NilClass" if values.nil?
|
109
|
+
|
110
|
+
values = values&.flatten if values.respond_to?(:flatten)
|
89
111
|
|
90
|
-
values.
|
112
|
+
values.filter { |value| Array(option_value).exclude?(value.class) }.map(&:class).uniq.join(", ")
|
91
113
|
end
|
92
114
|
end
|
93
115
|
end
|
data/lib/servactory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: servactory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.0
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -245,19 +245,22 @@ files:
|
|
245
245
|
- lib/generators/servactory/templates/services/application_service/result.rb
|
246
246
|
- lib/servactory.rb
|
247
247
|
- lib/servactory/actions/action.rb
|
248
|
-
- lib/servactory/actions/aliases/collection.rb
|
249
248
|
- lib/servactory/actions/collection.rb
|
250
249
|
- lib/servactory/actions/dsl.rb
|
251
|
-
- lib/servactory/actions/rescue_handlers/collection.rb
|
252
|
-
- lib/servactory/actions/shortcuts/collection.rb
|
253
250
|
- lib/servactory/actions/stages/collection.rb
|
254
251
|
- lib/servactory/actions/stages/stage.rb
|
255
252
|
- lib/servactory/actions/tools/rules.rb
|
256
253
|
- lib/servactory/actions/tools/runner.rb
|
257
254
|
- lib/servactory/actions/workspace.rb
|
258
255
|
- lib/servactory/base.rb
|
256
|
+
- lib/servactory/configuration/actions/aliases/collection.rb
|
257
|
+
- lib/servactory/configuration/actions/rescue_handlers/collection.rb
|
258
|
+
- lib/servactory/configuration/actions/shortcuts/collection.rb
|
259
|
+
- lib/servactory/configuration/collection_mode/class_names_collection.rb
|
259
260
|
- lib/servactory/configuration/dsl.rb
|
260
261
|
- lib/servactory/configuration/factory.rb
|
262
|
+
- lib/servactory/configuration/hash_mode/class_names_collection.rb
|
263
|
+
- lib/servactory/configuration/option_helpers/option_helpers_collection.rb
|
261
264
|
- lib/servactory/configuration/setup.rb
|
262
265
|
- lib/servactory/context/callable.rb
|
263
266
|
- lib/servactory/context/dsl.rb
|
@@ -298,7 +301,6 @@ files:
|
|
298
301
|
- lib/servactory/maintenance/attributes/define_method.rb
|
299
302
|
- lib/servactory/maintenance/attributes/option.rb
|
300
303
|
- lib/servactory/maintenance/attributes/option_helper.rb
|
301
|
-
- lib/servactory/maintenance/attributes/option_helpers_collection.rb
|
302
304
|
- lib/servactory/maintenance/attributes/options/registrar.rb
|
303
305
|
- lib/servactory/maintenance/attributes/options_collection.rb
|
304
306
|
- lib/servactory/maintenance/attributes/tools/check_errors.rb
|
@@ -311,7 +313,6 @@ files:
|
|
311
313
|
- lib/servactory/maintenance/attributes/validations/inclusion.rb
|
312
314
|
- lib/servactory/maintenance/attributes/validations/must.rb
|
313
315
|
- lib/servactory/maintenance/attributes/validations/type.rb
|
314
|
-
- lib/servactory/maintenance/hash_mode/class_names_collection.rb
|
315
316
|
- lib/servactory/maintenance/validations/object_schema.rb
|
316
317
|
- lib/servactory/maintenance/validations/types.rb
|
317
318
|
- lib/servactory/outputs/collection.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Servactory
|
4
|
-
module Actions
|
5
|
-
module Aliases
|
6
|
-
class Collection
|
7
|
-
extend Forwardable
|
8
|
-
def_delegators :@collection, :<<, :merge, :include?
|
9
|
-
|
10
|
-
def initialize(*)
|
11
|
-
@collection = Set.new
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Servactory
|
4
|
-
module Actions
|
5
|
-
module RescueHandlers
|
6
|
-
class Collection
|
7
|
-
extend Forwardable
|
8
|
-
def_delegators :@collection, :+, :detect, :reverse_each
|
9
|
-
|
10
|
-
def initialize(*)
|
11
|
-
@collection = Set.new
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Servactory
|
4
|
-
module Actions
|
5
|
-
module Shortcuts
|
6
|
-
class Collection
|
7
|
-
extend Forwardable
|
8
|
-
def_delegators :@collection, :<<, :each, :merge, :include?
|
9
|
-
|
10
|
-
def initialize(*)
|
11
|
-
@collection = Set.new
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|