roast-ai 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +2 -0
  3. data/.github/workflows/ci.yaml +1 -0
  4. data/.gitignore +0 -26
  5. data/.rubocop.yml +13 -0
  6. data/.rubocop_todo.yml +21 -0
  7. data/CHANGELOG.md +29 -0
  8. data/Gemfile +4 -0
  9. data/Gemfile.lock +43 -1
  10. data/bin/rubocop +27 -0
  11. data/bin/spoom +27 -0
  12. data/bin/srb +27 -0
  13. data/bin/srb-rbi +27 -0
  14. data/bin/tapioca +27 -0
  15. data/docs/INSTRUMENTATION.md +3 -3
  16. data/dsl/simple.rb +10 -0
  17. data/lib/roast/dsl/executor.rb +26 -0
  18. data/lib/roast/dsl.rb +7 -0
  19. data/lib/roast/errors.rb +1 -0
  20. data/lib/roast/factories/api_provider_factory.rb +1 -0
  21. data/lib/roast/helpers/function_caching_interceptor.rb +3 -0
  22. data/lib/roast/helpers/logger.rb +6 -9
  23. data/lib/roast/helpers/metadata_access.rb +1 -0
  24. data/lib/roast/helpers/minitest_coverage_runner.rb +1 -0
  25. data/lib/roast/helpers/path_resolver.rb +8 -18
  26. data/lib/roast/helpers/prompt_loader.rb +3 -2
  27. data/lib/roast/helpers/timeout_handler.rb +3 -5
  28. data/lib/roast/initializers.rb +1 -0
  29. data/lib/roast/resources/api_resource.rb +4 -3
  30. data/lib/roast/resources/base_resource.rb +1 -0
  31. data/lib/roast/resources/directory_resource.rb +1 -0
  32. data/lib/roast/resources/file_resource.rb +1 -0
  33. data/lib/roast/resources/none_resource.rb +1 -0
  34. data/lib/roast/resources/url_resource.rb +2 -1
  35. data/lib/roast/resources.rb +1 -2
  36. data/lib/roast/services/context_threshold_checker.rb +1 -0
  37. data/lib/roast/services/token_counting_service.rb +1 -0
  38. data/lib/roast/tools/apply_diff.rb +1 -0
  39. data/lib/roast/tools/ask_user.rb +1 -0
  40. data/lib/roast/tools/bash.rb +1 -0
  41. data/lib/roast/tools/cmd.rb +1 -0
  42. data/lib/roast/tools/coding_agent.rb +1 -0
  43. data/lib/roast/tools/context_summarizer.rb +1 -0
  44. data/lib/roast/tools/grep.rb +1 -0
  45. data/lib/roast/tools/helpers/coding_agent_message_formatter.rb +1 -0
  46. data/lib/roast/tools/read_file.rb +1 -0
  47. data/lib/roast/tools/search_file.rb +1 -0
  48. data/lib/roast/tools/swarm.rb +1 -0
  49. data/lib/roast/tools/update_files.rb +1 -0
  50. data/lib/roast/tools/write_file.rb +1 -0
  51. data/lib/roast/tools.rb +2 -0
  52. data/lib/roast/value_objects/api_token.rb +1 -0
  53. data/lib/roast/value_objects/step_name.rb +1 -0
  54. data/lib/roast/value_objects/uri_base.rb +1 -0
  55. data/lib/roast/value_objects/workflow_path.rb +1 -0
  56. data/lib/roast/value_objects.rb +1 -0
  57. data/lib/roast/version.rb +2 -1
  58. data/lib/roast/workflow/agent_step.rb +1 -0
  59. data/lib/roast/workflow/api_configuration.rb +1 -0
  60. data/lib/roast/workflow/base_iteration_step.rb +1 -0
  61. data/lib/roast/workflow/base_step.rb +1 -0
  62. data/lib/roast/workflow/base_workflow.rb +1 -0
  63. data/lib/roast/workflow/case_executor.rb +1 -0
  64. data/lib/roast/workflow/case_step.rb +1 -0
  65. data/lib/roast/workflow/command_executor.rb +1 -0
  66. data/lib/roast/workflow/conditional_executor.rb +1 -0
  67. data/lib/roast/workflow/conditional_step.rb +1 -0
  68. data/lib/roast/workflow/configuration.rb +9 -0
  69. data/lib/roast/workflow/configuration_loader.rb +4 -1
  70. data/lib/roast/workflow/context_manager.rb +1 -0
  71. data/lib/roast/workflow/context_path_resolver.rb +1 -0
  72. data/lib/roast/workflow/dot_access_hash.rb +1 -0
  73. data/lib/roast/workflow/each_step.rb +1 -0
  74. data/lib/roast/workflow/error_handler.rb +7 -1
  75. data/lib/roast/workflow/expression_evaluator.rb +1 -0
  76. data/lib/roast/workflow/expression_utils.rb +1 -0
  77. data/lib/roast/workflow/file_state_repository.rb +2 -1
  78. data/lib/roast/workflow/input_executor.rb +1 -0
  79. data/lib/roast/workflow/input_step.rb +1 -0
  80. data/lib/roast/workflow/interpolator.rb +2 -1
  81. data/lib/roast/workflow/iteration_executor.rb +1 -0
  82. data/lib/roast/workflow/llm_boolean_coercer.rb +1 -0
  83. data/lib/roast/workflow/metadata_manager.rb +1 -0
  84. data/lib/roast/workflow/output_handler.rb +1 -0
  85. data/lib/roast/workflow/output_manager.rb +1 -0
  86. data/lib/roast/workflow/parallel_executor.rb +1 -0
  87. data/lib/roast/workflow/prompt_step.rb +1 -0
  88. data/lib/roast/workflow/repeat_step.rb +1 -0
  89. data/lib/roast/workflow/replay_handler.rb +1 -0
  90. data/lib/roast/workflow/resource_resolver.rb +2 -6
  91. data/lib/roast/workflow/session_manager.rb +1 -0
  92. data/lib/roast/workflow/shell_script_step.rb +1 -0
  93. data/lib/roast/workflow/sqlite_state_repository.rb +1 -0
  94. data/lib/roast/workflow/state_manager.rb +1 -0
  95. data/lib/roast/workflow/state_repository.rb +1 -0
  96. data/lib/roast/workflow/state_repository_factory.rb +4 -2
  97. data/lib/roast/workflow/step_completion_reporter.rb +1 -0
  98. data/lib/roast/workflow/step_executor_coordinator.rb +9 -5
  99. data/lib/roast/workflow/step_executor_factory.rb +1 -0
  100. data/lib/roast/workflow/step_executor_registry.rb +2 -3
  101. data/lib/roast/workflow/step_executor_with_reporting.rb +1 -0
  102. data/lib/roast/workflow/step_executors/base_step_executor.rb +1 -0
  103. data/lib/roast/workflow/step_executors/hash_step_executor.rb +1 -0
  104. data/lib/roast/workflow/step_executors/parallel_step_executor.rb +1 -0
  105. data/lib/roast/workflow/step_executors/string_step_executor.rb +1 -0
  106. data/lib/roast/workflow/step_factory.rb +1 -0
  107. data/lib/roast/workflow/step_finder.rb +1 -0
  108. data/lib/roast/workflow/step_loader.rb +1 -0
  109. data/lib/roast/workflow/step_name_extractor.rb +1 -0
  110. data/lib/roast/workflow/step_runner.rb +1 -0
  111. data/lib/roast/workflow/step_type_resolver.rb +1 -0
  112. data/lib/roast/workflow/validation_command.rb +1 -0
  113. data/lib/roast/workflow/validator.rb +1 -0
  114. data/lib/roast/workflow/validators/base_validator.rb +1 -0
  115. data/lib/roast/workflow/validators/dependency_validator.rb +1 -0
  116. data/lib/roast/workflow/validators/linting_validator.rb +1 -0
  117. data/lib/roast/workflow/validators/schema_validator.rb +1 -0
  118. data/lib/roast/workflow/validators/step_collector.rb +1 -0
  119. data/lib/roast/workflow/validators/validation_orchestrator.rb +1 -0
  120. data/lib/roast/workflow/workflow_context.rb +1 -0
  121. data/lib/roast/workflow/workflow_execution_context.rb +1 -0
  122. data/lib/roast/workflow/workflow_executor.rb +2 -1
  123. data/lib/roast/workflow/workflow_initializer.rb +1 -0
  124. data/lib/roast/workflow/workflow_runner.rb +66 -55
  125. data/lib/roast/workflow.rb +1 -0
  126. data/lib/roast/workflow_diagram_generator.rb +3 -2
  127. data/lib/roast.rb +23 -8
  128. data/sorbet/config +8 -0
  129. data/sorbet/rbi/dsl/.gitattributes +1 -0
  130. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  131. data/sorbet/rbi/gems/.gitattributes +1 -0
  132. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +19107 -0
  133. data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
  134. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  135. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  136. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  137. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +62 -0
  138. data/sorbet/rbi/gems/cgi@0.5.0.rbi +2961 -0
  139. data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +568 -0
  140. data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +1991 -0
  141. data/sorbet/rbi/gems/cli-ui@2.3.0.rbi +3181 -0
  142. data/sorbet/rbi/gems/coderay@1.1.3.rbi +9 -0
  143. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11657 -0
  144. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  145. data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
  146. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +972 -0
  147. data/sorbet/rbi/gems/dotenv@3.1.8.rbi +295 -0
  148. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  149. data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +672 -0
  150. data/sorbet/rbi/gems/dry-core@1.1.0.rbi +1894 -0
  151. data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +659 -0
  152. data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +781 -0
  153. data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +1127 -0
  154. data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +3727 -0
  155. data/sorbet/rbi/gems/dry-types@1.8.3.rbi +3969 -0
  156. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  157. data/sorbet/rbi/gems/event_stream_parser@1.0.0.rbi +49 -0
  158. data/sorbet/rbi/gems/faraday-multipart@1.1.1.rbi +283 -0
  159. data/sorbet/rbi/gems/faraday-net_http@3.4.1.rbi +147 -0
  160. data/sorbet/rbi/gems/faraday-retry@2.3.2.rbi +9 -0
  161. data/sorbet/rbi/gems/faraday@2.13.1.rbi +2977 -0
  162. data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +1588 -0
  163. data/sorbet/rbi/gems/ffi@1.17.2.rbi +9 -0
  164. data/sorbet/rbi/gems/formatador@1.1.0.rbi +9 -0
  165. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +102 -0
  166. data/sorbet/rbi/gems/guard-minitest@2.4.6.rbi +402 -0
  167. data/sorbet/rbi/gems/guard@2.19.1.rbi +2283 -0
  168. data/sorbet/rbi/gems/hashdiff@1.2.0.rbi +355 -0
  169. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2359 -0
  170. data/sorbet/rbi/gems/json-schema@5.1.1.rbi +1466 -0
  171. data/sorbet/rbi/gems/json@2.12.2.rbi +2051 -0
  172. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  173. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +9 -0
  174. data/sorbet/rbi/gems/listen@3.9.0.rbi +1206 -0
  175. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  176. data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +1830 -0
  177. data/sorbet/rbi/gems/method_source@1.1.0.rbi +9 -0
  178. data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +136 -0
  179. data/sorbet/rbi/gems/mime-types@3.7.0.rbi +1342 -0
  180. data/sorbet/rbi/gems/minitest-rg@5.3.0.rbi +160 -0
  181. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1640 -0
  182. data/sorbet/rbi/gems/mocha@2.7.1.rbi +12 -0
  183. data/sorbet/rbi/gems/multipart-post@2.4.1.rbi +244 -0
  184. data/sorbet/rbi/gems/nenv@0.3.0.rbi +147 -0
  185. data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
  186. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  187. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +1079 -0
  188. data/sorbet/rbi/gems/open_router@0.3.3.rbi +230 -0
  189. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +354 -0
  190. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  191. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +5535 -0
  192. data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
  193. data/sorbet/rbi/gems/pry@0.15.2.rbi +9 -0
  194. data/sorbet/rbi/gems/public_suffix@6.0.2.rbi +936 -0
  195. data/sorbet/rbi/gems/racc@1.8.1.rbi +158 -0
  196. data/sorbet/rbi/gems/rack@2.2.17.rbi +5659 -0
  197. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +9 -0
  198. data/sorbet/rbi/gems/raix@1.0.2.rbi +1104 -0
  199. data/sorbet/rbi/gems/rake@13.3.0.rbi +3036 -0
  200. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +9 -0
  201. data/sorbet/rbi/gems/rb-inotify@0.11.1.rbi +9 -0
  202. data/sorbet/rbi/gems/rbi@0.3.6.rbi +6893 -0
  203. data/sorbet/rbi/gems/rbs@3.9.4.rbi +6978 -0
  204. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +9 -0
  205. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
  206. data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +9 -0
  207. data/sorbet/rbi/gems/rubocop-shopify@2.17.1.rbi +9 -0
  208. data/sorbet/rbi/gems/rubocop@1.77.0.rbi +9 -0
  209. data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +1333 -0
  210. data/sorbet/rbi/gems/ruby-openai@8.1.0.rbi +758 -0
  211. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +9 -0
  212. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  213. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  214. data/sorbet/rbi/gems/shellany@0.0.1.rbi +102 -0
  215. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  216. data/sorbet/rbi/gems/sqlite3@2.7.0.rbi +1900 -0
  217. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  218. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  219. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  220. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +9 -0
  221. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +9 -0
  222. data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
  223. data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
  224. data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
  225. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  226. data/sorbet/rbi/gems/yard@0.9.37.rbi +18492 -0
  227. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1429 -0
  228. data/sorbet/tapioca/config.yml +13 -0
  229. data/sorbet/tapioca/require.rb +36 -0
  230. metadata +113 -2
  231. data/lib/roast/workflow/configuration_parser.rb +0 -54
@@ -0,0 +1,1894 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `dry-core` gem.
5
+ # Please instead update this file by running `bin/tapioca gem dry-core`.
6
+
7
+
8
+ # source://dry-core//lib/dry/core/constants.rb#5
9
+ module Dry
10
+ class << self
11
+ # source://dry-configurable/1.3.0/lib/dry/configurable.rb#11
12
+ def Configurable(**options); end
13
+
14
+ # Build an equalizer module for the inclusion in other class
15
+ #
16
+ # ## Credits
17
+ #
18
+ # Equalizer has been originally imported from the equalizer gem created by Dan Kubb
19
+ #
20
+ # @api public
21
+ #
22
+ # source://dry-core//lib/dry/core.rb#52
23
+ def Equalizer(*keys, **options); end
24
+
25
+ # source://dry-types/1.8.3/lib/dry/types.rb#253
26
+ def Types(*namespaces, default: T.unsafe(nil), **aliases); end
27
+ end
28
+ end
29
+
30
+ # source://dry-core//lib/dry/core/constants.rb#6
31
+ module Dry::Core
32
+ include ::Dry::Core::Constants
33
+
34
+ class << self
35
+ # Build an equalizer module for the inclusion in other class
36
+ #
37
+ # ## Credits
38
+ #
39
+ # Equalizer has been originally imported from the equalizer gem created by Dan Kubb
40
+ #
41
+ # @api public
42
+ #
43
+ # source://dry-core//lib/dry/core.rb#38
44
+ def Equalizer(*keys, **options); end
45
+
46
+ # source://dry-core//lib/dry/core.rb#15
47
+ def loader; end
48
+ end
49
+ end
50
+
51
+ # BasicObject
52
+ #
53
+ # @since 0.8.0
54
+ #
55
+ # source://dry-core//lib/dry/core/basic_object.rb#9
56
+ class Dry::Core::BasicObject < ::BasicObject
57
+ # Returns the class for debugging purposes.
58
+ #
59
+ # @see http://ruby-doc.org/core/Object.html#method-i-class
60
+ # @since 0.8.0
61
+ #
62
+ # source://dry-core//lib/dry/core/basic_object.rb#32
63
+ def class; end
64
+
65
+ # source://dry-core//lib/dry/core/basic_object.rb#44
66
+ def inspect; end
67
+
68
+ # @since 0.8.0
69
+ def instance_of?(_arg0); end
70
+
71
+ # @since 0.8.0
72
+ def is_a?(_arg0); end
73
+
74
+ # @since 0.8.0
75
+ def kind_of?(_arg0); end
76
+
77
+ # Alias for __id__
78
+ #
79
+ # @return [Fixnum] the object id
80
+ # @see http://ruby-doc.org/core/Object.html#method-i-object_id
81
+ # @since 0.8.0
82
+ #
83
+ # source://dry-core//lib/dry/core/basic_object.rb#101
84
+ def object_id; end
85
+
86
+ # Interface for pp
87
+ #
88
+ # @param printer [PP] the Pretty Printable printer
89
+ # @return [String] the pretty-printable inspection of the object
90
+ # @see https://ruby-doc.org/stdlib/libdoc/pp/rdoc/PP.html
91
+ # @since 0.8.0
92
+ #
93
+ # source://dry-core//lib/dry/core/basic_object.rb#113
94
+ def pretty_print(printer); end
95
+
96
+ # Returns true if responds to the given method.
97
+ #
98
+ # @return [TrueClass, FalseClass] the result of the check
99
+ # @see http://ruby-doc.org/core/Object.html#method-i-respond_to-3F
100
+ # @since 0.8.0
101
+ #
102
+ # source://dry-core//lib/dry/core/basic_object.rb#124
103
+ def respond_to?(method_name, include_all = T.unsafe(nil)); end
104
+
105
+ private
106
+
107
+ # @api private
108
+ # @since 0.8.0
109
+ #
110
+ # source://dry-core//lib/dry/core/basic_object.rb#140
111
+ def __inspect; end
112
+
113
+ # Must be overridden by descendants
114
+ #
115
+ # @api private
116
+ # @return [Boolean]
117
+ # @since 0.8.0
118
+ #
119
+ # source://dry-core//lib/dry/core/basic_object.rb#134
120
+ def respond_to_missing?(_method_name, _include_all); end
121
+
122
+ class << self
123
+ # Lookups constants at the top-level namespace, if they are missing in the
124
+ # current context.
125
+ #
126
+ # @api private
127
+ # @param name [Symbol] the constant name
128
+ # @raise [NameError] if the constant cannot be found
129
+ # @return [Object, Module] the constant
130
+ # @see https://ruby-doc.org/core/Module.html#method-i-const_missing
131
+ # @since 0.8.0
132
+ #
133
+ # source://dry-core//lib/dry/core/basic_object.rb#23
134
+ def const_missing(name); end
135
+ end
136
+ end
137
+
138
+ # Allows you to cache call results that are solely determined by arguments.
139
+ #
140
+ # @api public
141
+ # @example
142
+ # require 'dry/core/cache'
143
+ #
144
+ # class Foo
145
+ # extend Dry::Core::Cache
146
+ #
147
+ # def heavy_computation(arg1, arg2)
148
+ # fetch_or_store(arg1, arg2) { arg1 ^ arg2 }
149
+ # end
150
+ # end
151
+ #
152
+ # source://dry-core//lib/dry/core/cache.rb#21
153
+ module Dry::Core::Cache
154
+ # @api private
155
+ #
156
+ # source://dry-core//lib/dry/core/cache.rb#36
157
+ def cache; end
158
+
159
+ # Caches a result of the block evaluation
160
+ #
161
+ # @api public
162
+ # @note beware Proc instance hashes are not equal, i.e. -> { 1 }.hash != -> { 1 }.hash,
163
+ # this means you shouldn't pass Procs in args unless you're sure
164
+ # they are always the same instances, otherwise you introduce a memory leak
165
+ # @param args [Array<Object>] List of hashable objects
166
+ # @return [Object] block's return value (cached for subsequent calls with
167
+ # the same argument values)
168
+ # @yield An arbitrary block
169
+ #
170
+ # source://dry-core//lib/dry/core/cache.rb#51
171
+ def fetch_or_store(*args, &_arg1); end
172
+
173
+ # @api private
174
+ #
175
+ # source://dry-core//lib/dry/core/cache.rb#30
176
+ def inherited(klass); end
177
+
178
+ class << self
179
+ # @api private
180
+ # @private
181
+ #
182
+ # source://dry-core//lib/dry/core/cache.rb#23
183
+ def extended(klass); end
184
+ end
185
+ end
186
+
187
+ # Instance methods
188
+ #
189
+ # @api public
190
+ #
191
+ # source://dry-core//lib/dry/core/cache.rb#56
192
+ module Dry::Core::Cache::Methods
193
+ # Delegates call to the class-level method
194
+ #
195
+ # @api public
196
+ # @param args [Array<Object>] List of hashable objects
197
+ # @return [Object] block's return value
198
+ # @yield An arbitrary block
199
+ #
200
+ # source://dry-core//lib/dry/core/cache.rb#63
201
+ def fetch_or_store(*_arg0, **_arg1, &_arg2); end
202
+ end
203
+
204
+ # Internal support module for class-level settings
205
+ #
206
+ # @api public
207
+ #
208
+ # source://dry-core//lib/dry/core/class_attributes.rb#10
209
+ module Dry::Core::ClassAttributes
210
+ include ::Dry::Core::Constants
211
+
212
+ # Specify what attributes a class will use
213
+ #
214
+ # @api public
215
+ # @example
216
+ # class ExtraClass
217
+ # extend Dry::Core::ClassAttributes
218
+ #
219
+ # defines :hello
220
+ #
221
+ # hello 'world'
222
+ # end
223
+ # @example with inheritance and type checking
224
+ #
225
+ # class MyClass
226
+ # extend Dry::Core::ClassAttributes
227
+ #
228
+ # defines :one, :two, type: Integer
229
+ #
230
+ # one 1
231
+ # two 2
232
+ # end
233
+ #
234
+ # class OtherClass < MyClass
235
+ # two 3
236
+ # end
237
+ #
238
+ # MyClass.one # => 1
239
+ # MyClass.two # => 2
240
+ #
241
+ # OtherClass.one # => 1
242
+ # OtherClass.two # => 3
243
+ # @example with dry-types
244
+ #
245
+ # class Foo
246
+ # extend Dry::Core::ClassAttributes
247
+ #
248
+ # defines :one, :two, type: Dry::Types['strict.int']
249
+ # end
250
+ # @example with coercion using Proc
251
+ #
252
+ # class Bar
253
+ # extend Dry::Core::ClassAttributes
254
+ #
255
+ # defines :one, coerce: proc { |value| value.to_s }
256
+ # end
257
+ # @example with coercion using dry-types
258
+ #
259
+ # class Bar
260
+ # extend Dry::Core::ClassAttributes
261
+ #
262
+ # defines :one, coerce: Dry::Types['coercible.string']
263
+ # end
264
+ #
265
+ # source://dry-core//lib/dry/core/class_attributes.rb#68
266
+ def defines(*args, type: T.unsafe(nil), coerce: T.unsafe(nil)); end
267
+ end
268
+
269
+ # source://dry-core//lib/dry/core/constants.rb#112
270
+ Dry::Core::ClassAttributes::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
271
+
272
+ # source://dry-core//lib/dry/core/constants.rb#112
273
+ Dry::Core::ClassAttributes::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
274
+
275
+ # source://dry-core//lib/dry/core/constants.rb#112
276
+ Dry::Core::ClassAttributes::EMPTY_OPTS = T.let(T.unsafe(nil), Hash)
277
+
278
+ # source://dry-core//lib/dry/core/constants.rb#112
279
+ Dry::Core::ClassAttributes::EMPTY_SET = T.let(T.unsafe(nil), Set)
280
+
281
+ # source://dry-core//lib/dry/core/constants.rb#112
282
+ Dry::Core::ClassAttributes::EMPTY_STRING = T.let(T.unsafe(nil), String)
283
+
284
+ # source://dry-core//lib/dry/core/constants.rb#112
285
+ Dry::Core::ClassAttributes::IDENTITY = T.let(T.unsafe(nil), Proc)
286
+
287
+ # source://dry-core//lib/dry/core/constants.rb#112
288
+ Dry::Core::ClassAttributes::Self = T.let(T.unsafe(nil), Proc)
289
+
290
+ # source://dry-core//lib/dry/core/constants.rb#112
291
+ Dry::Core::ClassAttributes::Undefined = T.let(T.unsafe(nil), Object)
292
+
293
+ # Class for generating more classes
294
+ #
295
+ # source://dry-core//lib/dry/core/class_builder.rb#6
296
+ class Dry::Core::ClassBuilder
297
+ # @return [ClassBuilder] a new instance of ClassBuilder
298
+ #
299
+ # source://dry-core//lib/dry/core/class_builder.rb#11
300
+ def initialize(name:, parent: T.unsafe(nil), namespace: T.unsafe(nil)); end
301
+
302
+ # Generate a class based on options
303
+ #
304
+ # @example Create anonymous class
305
+ # builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
306
+ #
307
+ # klass = builder.call
308
+ # klass.name # => "MyClass"
309
+ # @example Create named class
310
+ # builder = Dry::Core::ClassBuilder.new(name: 'User', namespace: Entities)
311
+ #
312
+ # klass = builder.call
313
+ # klass.name # => "Entities::User"
314
+ # klass.superclass.name # => "Entities::User"
315
+ # Entities::User # => "Entities::User"
316
+ # klass.superclass == Entities::User # => true
317
+ # @return [Class]
318
+ # @yield [klass]
319
+ #
320
+ # source://dry-core//lib/dry/core/class_builder.rb#35
321
+ def call; end
322
+
323
+ # Returns the value of attribute name.
324
+ #
325
+ # source://dry-core//lib/dry/core/class_builder.rb#9
326
+ def name; end
327
+
328
+ # Returns the value of attribute namespace.
329
+ #
330
+ # source://dry-core//lib/dry/core/class_builder.rb#9
331
+ def namespace; end
332
+
333
+ # Returns the value of attribute parent.
334
+ #
335
+ # source://dry-core//lib/dry/core/class_builder.rb#9
336
+ def parent; end
337
+
338
+ private
339
+
340
+ # @api private
341
+ #
342
+ # source://dry-core//lib/dry/core/class_builder.rb#50
343
+ def create_anonymous; end
344
+
345
+ # @api private
346
+ #
347
+ # source://dry-core//lib/dry/core/class_builder.rb#81
348
+ def create_base(namespace, name, parent); end
349
+
350
+ # @api private
351
+ #
352
+ # source://dry-core//lib/dry/core/class_builder.rb#64
353
+ def create_named; end
354
+ end
355
+
356
+ # source://dry-core//lib/dry/core/class_builder.rb#7
357
+ class Dry::Core::ClassBuilder::ParentClassMismatch < ::TypeError; end
358
+
359
+ # A list of constants you can use to avoid memory allocations or identity checks.
360
+ #
361
+ # @api public
362
+ # @example Just include this module to your class or module
363
+ # class Foo
364
+ # include Dry::Core::Constants
365
+ # def call(value = EMPTY_ARRAY)
366
+ # value.map(&:to_s)
367
+ # end
368
+ # end
369
+ #
370
+ # source://dry-core//lib/dry/core/constants.rb#18
371
+ module Dry::Core::Constants
372
+ class << self
373
+ # @api public
374
+ # @private
375
+ #
376
+ # source://dry-core//lib/dry/core/constants.rb#108
377
+ def included(base); end
378
+ end
379
+ end
380
+
381
+ # An empty array
382
+ #
383
+ # @api public
384
+ #
385
+ # source://dry-core//lib/dry/core/constants.rb#20
386
+ Dry::Core::Constants::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
387
+
388
+ # An empty hash
389
+ #
390
+ # @api public
391
+ #
392
+ # source://dry-core//lib/dry/core/constants.rb#22
393
+ Dry::Core::Constants::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
394
+
395
+ # An empty list of options
396
+ #
397
+ # @api public
398
+ #
399
+ # source://dry-core//lib/dry/core/constants.rb#24
400
+ Dry::Core::Constants::EMPTY_OPTS = T.let(T.unsafe(nil), Hash)
401
+
402
+ # An empty set
403
+ #
404
+ # @api public
405
+ #
406
+ # source://dry-core//lib/dry/core/constants.rb#26
407
+ Dry::Core::Constants::EMPTY_SET = T.let(T.unsafe(nil), Set)
408
+
409
+ # An empty string
410
+ #
411
+ # @api public
412
+ #
413
+ # source://dry-core//lib/dry/core/constants.rb#28
414
+ Dry::Core::Constants::EMPTY_STRING = T.let(T.unsafe(nil), String)
415
+
416
+ # Identity function
417
+ #
418
+ # @api public
419
+ #
420
+ # source://dry-core//lib/dry/core/constants.rb#30
421
+ Dry::Core::Constants::IDENTITY = T.let(T.unsafe(nil), Proc)
422
+
423
+ # source://dry-core//lib/dry/core/constants.rb#45
424
+ Dry::Core::Constants::Self = T.let(T.unsafe(nil), Proc)
425
+
426
+ # A special value you can use as a default to know if no arguments
427
+ # were passed to the method
428
+ #
429
+ # @api public
430
+ # @example
431
+ # def method(value = Undefined)
432
+ # if Undefined.equal?(value)
433
+ # puts 'no args'
434
+ # else
435
+ # puts value
436
+ # end
437
+ # end
438
+ #
439
+ # source://dry-core//lib/dry/core/constants.rb#43
440
+ Dry::Core::Constants::Undefined = T.let(T.unsafe(nil), Object)
441
+
442
+ # Thread-safe object registry
443
+ #
444
+ # @api public
445
+ # @example
446
+ #
447
+ # container = Dry::Core::Container.new
448
+ # container.register(:item, 'item')
449
+ # container.resolve(:item)
450
+ # => 'item'
451
+ #
452
+ # container.register(:item1, -> { 'item' })
453
+ # container.resolve(:item1)
454
+ # => 'item'
455
+ #
456
+ # container.register(:item2, -> { 'item' }, call: false)
457
+ # container.resolve(:item2)
458
+ # => #<Proc:0x007f33b169e998@(irb):10 (lambda)>
459
+ #
460
+ # source://dry-core//lib/dry/core/container.rb#23
461
+ class Dry::Core::Container
462
+ include ::Dry::Core::Container::Mixin::Initializer
463
+ include ::Dry::Core::Constants
464
+ include ::Dry::Core::Container::Mixin
465
+ extend ::Dry::Core::Container::Configuration
466
+ extend ::Dry::Core::Constants
467
+ extend ::Dry::Configurable
468
+ extend ::Dry::Configurable::Methods
469
+ extend ::Dry::Configurable::ClassMethods
470
+
471
+ # source://dry-core//lib/dry/core/container/mixin.rb#83
472
+ def config; end
473
+ end
474
+
475
+ # @api public
476
+ #
477
+ # source://dry-core//lib/dry/core/container/config.rb#7
478
+ class Dry::Core::Container::Config
479
+ # @api private
480
+ # @return [Config] a new instance of Config
481
+ #
482
+ # source://dry-core//lib/dry/core/container/config.rb#22
483
+ def initialize(namespace_separator: T.unsafe(nil), resolver: T.unsafe(nil), registry: T.unsafe(nil)); end
484
+
485
+ # @api public
486
+ #
487
+ # source://dry-core//lib/dry/core/container/config.rb#13
488
+ def namespace_separator; end
489
+
490
+ # @api public
491
+ #
492
+ # source://dry-core//lib/dry/core/container/config.rb#13
493
+ def namespace_separator=(_arg0); end
494
+
495
+ # @api public
496
+ #
497
+ # source://dry-core//lib/dry/core/container/config.rb#19
498
+ def registry; end
499
+
500
+ # @api public
501
+ #
502
+ # source://dry-core//lib/dry/core/container/config.rb#19
503
+ def registry=(_arg0); end
504
+
505
+ # @api public
506
+ #
507
+ # source://dry-core//lib/dry/core/container/config.rb#16
508
+ def resolver; end
509
+
510
+ # @api public
511
+ #
512
+ # source://dry-core//lib/dry/core/container/config.rb#16
513
+ def resolver=(_arg0); end
514
+ end
515
+
516
+ # @api public
517
+ #
518
+ # source://dry-core//lib/dry/core/container/config.rb#8
519
+ Dry::Core::Container::Config::DEFAULT_NAMESPACE_SEPARATOR = T.let(T.unsafe(nil), String)
520
+
521
+ # @api public
522
+ #
523
+ # source://dry-core//lib/dry/core/container/config.rb#10
524
+ Dry::Core::Container::Config::DEFAULT_REGISTRY = T.let(T.unsafe(nil), Dry::Core::Container::Registry)
525
+
526
+ # @api public
527
+ #
528
+ # source://dry-core//lib/dry/core/container/config.rb#9
529
+ Dry::Core::Container::Config::DEFAULT_RESOLVER = T.let(T.unsafe(nil), Dry::Core::Container::Resolver)
530
+
531
+ # @api public
532
+ #
533
+ # source://dry-core//lib/dry/core/container/configuration.rb#7
534
+ module Dry::Core::Container::Configuration
535
+ # @api private
536
+ # @yield [config]
537
+ #
538
+ # source://dry-core//lib/dry/core/container/configuration.rb#31
539
+ def configure; end
540
+
541
+ class << self
542
+ # source://dry-core//lib/dry/core/container/configuration.rb#13
543
+ def extended(klass); end
544
+ end
545
+ end
546
+
547
+ # source://dry-core//lib/dry/core/constants.rb#112
548
+ Dry::Core::Container::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
549
+
550
+ # source://dry-core//lib/dry/core/constants.rb#112
551
+ Dry::Core::Container::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
552
+
553
+ # source://dry-core//lib/dry/core/constants.rb#112
554
+ Dry::Core::Container::EMPTY_OPTS = T.let(T.unsafe(nil), Hash)
555
+
556
+ # source://dry-core//lib/dry/core/constants.rb#112
557
+ Dry::Core::Container::EMPTY_SET = T.let(T.unsafe(nil), Set)
558
+
559
+ # source://dry-core//lib/dry/core/constants.rb#112
560
+ Dry::Core::Container::EMPTY_STRING = T.let(T.unsafe(nil), String)
561
+
562
+ # @api public
563
+ #
564
+ # source://dry-core//lib/dry/core/container/mixin.rb#12
565
+ class Dry::Core::Container::Error < ::StandardError; end
566
+
567
+ # source://dry-core//lib/dry/core/constants.rb#112
568
+ Dry::Core::Container::IDENTITY = T.let(T.unsafe(nil), Proc)
569
+
570
+ # Base class to abstract Memoizable and Callable implementations
571
+ #
572
+ # @api abstract
573
+ #
574
+ # source://dry-core//lib/dry/core/container/item.rb#10
575
+ class Dry::Core::Container::Item
576
+ # @api abstract
577
+ # @return [Item] a new instance of Item
578
+ #
579
+ # source://dry-core//lib/dry/core/container/item.rb#20
580
+ def initialize(item, options = T.unsafe(nil)); end
581
+
582
+ # @api abstract
583
+ # @raise [::NotImplementedError]
584
+ #
585
+ # source://dry-core//lib/dry/core/container/item.rb#29
586
+ def call; end
587
+
588
+ # @api abstract
589
+ # @private
590
+ # @return [Boolean]
591
+ #
592
+ # source://dry-core//lib/dry/core/container/item.rb#39
593
+ def callable?; end
594
+
595
+ # @api abstract
596
+ # @return [Mixed] the item to be solved later
597
+ #
598
+ # source://dry-core//lib/dry/core/container/item.rb#14
599
+ def item; end
600
+
601
+ # Build a new item with transformation applied
602
+ #
603
+ # @api abstract
604
+ # @private
605
+ #
606
+ # source://dry-core//lib/dry/core/container/item.rb#46
607
+ def map(func); end
608
+
609
+ # @api abstract
610
+ # @return [Hash] the options to memoize, call or no.
611
+ #
612
+ # source://dry-core//lib/dry/core/container/item.rb#17
613
+ def options; end
614
+
615
+ # @api abstract
616
+ # @private
617
+ # @return [Boolean]
618
+ #
619
+ # source://dry-core//lib/dry/core/container/item.rb#34
620
+ def value?; end
621
+ end
622
+
623
+ # Callable class to returns a item call
624
+ #
625
+ # @api public
626
+ #
627
+ # source://dry-core//lib/dry/core/container/item/callable.rb#11
628
+ class Dry::Core::Container::Item::Callable < ::Dry::Core::Container::Item
629
+ # Returns the result of item call or item
630
+ #
631
+ # @api public
632
+ # @return [Mixed]
633
+ #
634
+ # source://dry-core//lib/dry/core/container/item/callable.rb#15
635
+ def call; end
636
+ end
637
+
638
+ # Factory for create an Item to register inside of container
639
+ #
640
+ # @api public
641
+ #
642
+ # source://dry-core//lib/dry/core/container/item/factory.rb#10
643
+ class Dry::Core::Container::Item::Factory
644
+ # Creates an Item Memoizable or Callable
645
+ #
646
+ # @api public
647
+ # @param item [Mixed]
648
+ # @param options [Hash]
649
+ # @raise [Dry::Core::Container::Error]
650
+ # @return [Dry::Core::Container::Item::Base]
651
+ #
652
+ # source://dry-core//lib/dry/core/container/item/factory.rb#18
653
+ def call(item, options = T.unsafe(nil)); end
654
+ end
655
+
656
+ # Memoizable class to store and execute item calls
657
+ #
658
+ # @api public
659
+ #
660
+ # source://dry-core//lib/dry/core/container/item/memoizable.rb#11
661
+ class Dry::Core::Container::Item::Memoizable < ::Dry::Core::Container::Item
662
+ # Returns a new Memoizable instance
663
+ #
664
+ # @api public
665
+ # @param item [Mixed]
666
+ # @param options [Hash]
667
+ # @raise [Dry::Core::Container::Error]
668
+ # @return [Dry::Core::Container::Item::Base]
669
+ #
670
+ # source://dry-core//lib/dry/core/container/item/memoizable.rb#23
671
+ def initialize(item, options = T.unsafe(nil)); end
672
+
673
+ # Returns the result of item call using a syncronized mutex
674
+ #
675
+ # @api public
676
+ # @return [Dry::Core::Container::Item::Base]
677
+ #
678
+ # source://dry-core//lib/dry/core/container/item/memoizable.rb#33
679
+ def call; end
680
+
681
+ # @api public
682
+ # @return [Mutex] the stored mutex
683
+ #
684
+ # source://dry-core//lib/dry/core/container/item/memoizable.rb#13
685
+ def memoize_mutex; end
686
+
687
+ private
688
+
689
+ # @api public
690
+ # @private
691
+ # @raise [::Dry::Core::Container::Error]
692
+ #
693
+ # source://dry-core//lib/dry/core/container/item/memoizable.rb#42
694
+ def raise_not_supported_error; end
695
+ end
696
+
697
+ # @api abstract
698
+ #
699
+ # source://dry-core//lib/dry/core/container/item.rb#11
700
+ Dry::Core::Container::Item::NO_OPTIONS = T.let(T.unsafe(nil), Hash)
701
+
702
+ # Error raised when key is not defined in the registry
703
+ #
704
+ # @api public
705
+ #
706
+ # source://dry-core//lib/dry/core/container/mixin.rb#17
707
+ class Dry::Core::Container::KeyError < ::KeyError; end
708
+
709
+ # Mixin to expose Inversion of Control (IoC) container behaviour
710
+ #
711
+ #
712
+ # @api public
713
+ # @example
714
+ #
715
+ # class MyClass
716
+ # extend Dry::Core::Container::Mixin
717
+ # end
718
+ #
719
+ # MyClass.register(:item, 'item')
720
+ # MyClass.resolve(:item)
721
+ # => 'item'
722
+ #
723
+ # class MyObject
724
+ # include Dry::Core::Container::Mixin
725
+ # end
726
+ #
727
+ # container = MyObject.new
728
+ # container.register(:item, 'item')
729
+ # container.resolve(:item)
730
+ # => 'item'
731
+ #
732
+ # source://dry-core//lib/dry/core/container/mixin.rb#47
733
+ module Dry::Core::Container::Mixin
734
+ mixes_in_class_methods ::Dry::Core::Container::Configuration
735
+ mixes_in_class_methods ::Dry::Configurable
736
+ mixes_in_class_methods ::Dry::Configurable::ClassMethods
737
+
738
+ # Resolve an item from the container
739
+ #
740
+ # @api public
741
+ # @param key [Mixed] The key for the item you wish to resolve
742
+ # @return [Mixed]
743
+ # @see Dry::Core::Container::Mixin#resolve
744
+ #
745
+ # source://dry-core//lib/dry/core/container/mixin.rb#144
746
+ def [](key); end
747
+
748
+ # @api public
749
+ # @private no, really
750
+ #
751
+ # source://dry-core//lib/dry/core/container/mixin.rb#288
752
+ def _container; end
753
+
754
+ # @api public
755
+ #
756
+ # source://dry-core//lib/dry/core/container/mixin.rb#300
757
+ def clone; end
758
+
759
+ # Decorates an item from the container with specified decorator
760
+ #
761
+ # @api public
762
+ # @return [Dry::Core::Container::Mixin] self
763
+ #
764
+ # source://dry-core//lib/dry/core/container/mixin.rb#227
765
+ def decorate(key, with: T.unsafe(nil), &block); end
766
+
767
+ # @api public
768
+ #
769
+ # source://dry-core//lib/dry/core/container/mixin.rb#293
770
+ def dup; end
771
+
772
+ # Calls block once for each key/value pair in the container, passing the key and
773
+ # the registered item parameters.
774
+ #
775
+ # If no block is given, an enumerator is returned instead.
776
+ #
777
+ # @api public
778
+ # @note In discussions with other developers, it was felt that being able to iterate
779
+ # over not just the registered keys, but to see what was registered would be
780
+ # very helpful. This is a step toward doing that.
781
+ # @return [Enumerator]
782
+ #
783
+ # source://dry-core//lib/dry/core/container/mixin.rb#218
784
+ def each(&_arg0); end
785
+
786
+ # Calls block once for each key in container, passing the key as a parameter.
787
+ #
788
+ # If no block is given, an enumerator is returned instead.
789
+ #
790
+ # @api public
791
+ # @return [Dry::Core::Container::Mixin] self
792
+ #
793
+ # source://dry-core//lib/dry/core/container/mixin.rb#201
794
+ def each_key(&_arg0); end
795
+
796
+ # Enable stubbing functionality into the current container
797
+ #
798
+ # @api public
799
+ #
800
+ # source://dry-core//lib/dry/core/container/stub.rb#51
801
+ def enable_stubs!; end
802
+
803
+ # Freeze the container. Nothing can be registered after freezing
804
+ #
805
+ # @api public
806
+ #
807
+ # source://dry-core//lib/dry/core/container/mixin.rb#281
808
+ def freeze; end
809
+
810
+ # Import a namespace
811
+ #
812
+ # @api public
813
+ # @param namespace [Dry::Core::Container::Namespace] The namespace to import
814
+ # @return [Dry::Core::Container::Mixin] self
815
+ #
816
+ # source://dry-core//lib/dry/core/container/mixin.rb#272
817
+ def import(namespace); end
818
+
819
+ # Check whether an item is registered under the given key
820
+ #
821
+ # @api public
822
+ # @param key [Mixed] The key you wish to check for registration with
823
+ # @return [Bool]
824
+ #
825
+ # source://dry-core//lib/dry/core/container/mixin.rb#181
826
+ def key?(key); end
827
+
828
+ # An array of registered names for the container
829
+ #
830
+ # @api public
831
+ # @return [Array<String>]
832
+ #
833
+ # source://dry-core//lib/dry/core/container/mixin.rb#190
834
+ def keys; end
835
+
836
+ # Merge in the items of the other container
837
+ #
838
+ # @api public
839
+ # @param other [Dry::Core::Container] The other container to merge in
840
+ # @param namespace [Symbol, nil] Namespace to prefix other container items with, defaults to nil
841
+ # @return [Dry::Core::Container::Mixin] self
842
+ #
843
+ # source://dry-core//lib/dry/core/container/mixin.rb#158
844
+ def merge(other, namespace: T.unsafe(nil), &block); end
845
+
846
+ # Evaluate block and register items in namespace
847
+ #
848
+ # @api public
849
+ # @param namespace [Mixed] The namespace to register items in
850
+ # @return [Dry::Core::Container::Mixin] self
851
+ #
852
+ # source://dry-core//lib/dry/core/container/mixin.rb#253
853
+ def namespace(namespace, &_arg1); end
854
+
855
+ # Register an item with the container to be resolved later
856
+ #
857
+ # @api public
858
+ # @param key [Mixed] The key to register the container item with (used to resolve)
859
+ # @param contents [Mixed] The item to register with the container (if no block given)
860
+ # @param options [Hash] Options to pass to the registry when registering the item
861
+ # @return [Dry::Core::Container::Mixin] self
862
+ # @yield If a block is given, contents will be ignored and the block
863
+ # will be registered instead
864
+ #
865
+ # source://dry-core//lib/dry/core/container/mixin.rb#104
866
+ def register(key, contents = T.unsafe(nil), options = T.unsafe(nil), &block); end
867
+
868
+ # Resolve an item from the container
869
+ #
870
+ # @api public
871
+ # @param key [Mixed] The key for the item you wish to resolve
872
+ # @return [Mixed]
873
+ # @yield Fallback block to call when a key is missing. Its result will be returned
874
+ # @yieldparam key [Mixed] Missing key
875
+ #
876
+ # source://dry-core//lib/dry/core/container/mixin.rb#131
877
+ def resolve(key, &_arg1); end
878
+
879
+ class << self
880
+ # @api public
881
+ # @private
882
+ # @private
883
+ #
884
+ # source://dry-core//lib/dry/core/container/mixin.rb#53
885
+ def extended(base); end
886
+
887
+ # @api public
888
+ # @private
889
+ # @private
890
+ #
891
+ # source://dry-core//lib/dry/core/container/mixin.rb#78
892
+ def included(base); end
893
+ end
894
+ end
895
+
896
+ # @api public
897
+ # @private
898
+ #
899
+ # source://dry-core//lib/dry/core/container/mixin.rb#70
900
+ module Dry::Core::Container::Mixin::Initializer
901
+ # @api public
902
+ #
903
+ # source://dry-core//lib/dry/core/container/mixin.rb#71
904
+ def initialize(*_arg0, **_arg1, &_arg2); end
905
+ end
906
+
907
+ # @api public
908
+ #
909
+ # source://dry-core//lib/dry/core/container/mixin.rb#48
910
+ Dry::Core::Container::Mixin::PREFIX_NAMESPACE = T.let(T.unsafe(nil), Proc)
911
+
912
+ # Create a namespace to be imported
913
+ #
914
+ # @api public
915
+ # @example
916
+ #
917
+ # ns = Dry::Core::Container::Namespace.new('name') do
918
+ # register('item', 'item')
919
+ # end
920
+ #
921
+ # container = Dry::Core::Container.new
922
+ #
923
+ # container.import(ns)
924
+ #
925
+ # container.resolve('name.item')
926
+ # => 'item'
927
+ #
928
+ # source://dry-core//lib/dry/core/container/namespace.rb#23
929
+ class Dry::Core::Container::Namespace
930
+ # Create a new namespace
931
+ #
932
+ # @api public
933
+ # @param name [Mixed] The name of the namespace
934
+ # @return [Dry::Core::Container::Namespace]
935
+ # @yield The block to evaluate when the namespace is imported
936
+ #
937
+ # source://dry-core//lib/dry/core/container/namespace.rb#40
938
+ def initialize(name, &block); end
939
+
940
+ # @api public
941
+ # @return [Proc] The block to be executed when the namespace is imported
942
+ #
943
+ # source://dry-core//lib/dry/core/container/namespace.rb#28
944
+ def block; end
945
+
946
+ # @api public
947
+ # @return [Mixed] The namespace (name)
948
+ #
949
+ # source://dry-core//lib/dry/core/container/namespace.rb#25
950
+ def name; end
951
+ end
952
+
953
+ # @api private
954
+ #
955
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#9
956
+ class Dry::Core::Container::NamespaceDSL < ::SimpleDelegator
957
+ # DSL for defining namespaces
958
+ #
959
+ # @api private
960
+ # @param container [Dry::Core::Container::Mixin] The container
961
+ # @param namespace [String] The namespace (name)
962
+ # @param namespace_separator [String] The namespace separator
963
+ # @return [Mixed]
964
+ # @yield The block to evaluate to define the namespace
965
+ #
966
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#24
967
+ def initialize(container, namespace, namespace_separator, &block); end
968
+
969
+ # @api private
970
+ #
971
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#45
972
+ def import(namespace); end
973
+
974
+ # @api private
975
+ #
976
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#41
977
+ def namespace(namespace, &_arg1); end
978
+
979
+ # @api private
980
+ #
981
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#37
982
+ def register(key, *_arg1, **_arg2, &_arg3); end
983
+
984
+ # @api private
985
+ #
986
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#51
987
+ def resolve(key); end
988
+
989
+ private
990
+
991
+ # @api private
992
+ #
993
+ # source://dry-core//lib/dry/core/container/namespace_dsl.rb#57
994
+ def namespaced(key); end
995
+ end
996
+
997
+ # Default registry for registering items with the container
998
+ #
999
+ # @api public
1000
+ #
1001
+ # source://dry-core//lib/dry/core/container/registry.rb#9
1002
+ class Dry::Core::Container::Registry
1003
+ # @api public
1004
+ # @private
1005
+ # @return [Registry] a new instance of Registry
1006
+ #
1007
+ # source://dry-core//lib/dry/core/container/registry.rb#11
1008
+ def initialize; end
1009
+
1010
+ # Register an item with the container to be resolved later
1011
+ #
1012
+ # @api public
1013
+ # @option options
1014
+ # @param key [Mixed] The key to register the container item with (used to resolve)
1015
+ # @param options [Hash]
1016
+ # @param item [Mixed] The item to register with the container
1017
+ # @param container [Concurrent::Hash] The container
1018
+ # @raise [Dry::Core::Container::KeyError] If an item is already registered with the given key
1019
+ # @return [Mixed]
1020
+ #
1021
+ # source://dry-core//lib/dry/core/container/registry.rb#33
1022
+ def call(container, key, item, options); end
1023
+
1024
+ # @api private
1025
+ #
1026
+ # source://dry-core//lib/dry/core/container/registry.rb#46
1027
+ def factory; end
1028
+ end
1029
+
1030
+ # Default resolver for resolving items from container
1031
+ #
1032
+ # @api public
1033
+ #
1034
+ # source://dry-core//lib/dry/core/container/resolver.rb#9
1035
+ class Dry::Core::Container::Resolver
1036
+ # Resolve an item from the container
1037
+ #
1038
+ # @api public
1039
+ # @param container [Concurrent::Hash] The container
1040
+ # @param key [Mixed] The key for the item you wish to resolve
1041
+ # @raise [KeyError] If the given key is not registered with the container (and no block provided)
1042
+ # @return [Mixed]
1043
+ # @yield Fallback block to call when a key is missing. Its result will be returned
1044
+ # @yieldparam key [Mixed] Missing key
1045
+ #
1046
+ # source://dry-core//lib/dry/core/container/resolver.rb#27
1047
+ def call(container, key); end
1048
+
1049
+ # Calls block once for each key in container, passing the key and
1050
+ # the registered item parameters.
1051
+ #
1052
+ # If no block is given, an enumerator is returned instead.
1053
+ #
1054
+ # @api public
1055
+ # @note In discussions with other developers, it was felt that being able
1056
+ # to iterate over not just the registered keys, but to see what was
1057
+ # registered would be very helpful. This is a step toward doing that.
1058
+ # @return Key, Value
1059
+ #
1060
+ # source://dry-core//lib/dry/core/container/resolver.rb#84
1061
+ def each(container, &_arg1); end
1062
+
1063
+ # Calls block once for each key in container, passing the key as a parameter.
1064
+ #
1065
+ # If no block is given, an enumerator is returned instead.
1066
+ #
1067
+ # @api public
1068
+ # @return Hash
1069
+ #
1070
+ # source://dry-core//lib/dry/core/container/resolver.rb#69
1071
+ def each_key(container, &_arg1); end
1072
+
1073
+ # Check whether an items is registered under the given key
1074
+ #
1075
+ # @api public
1076
+ # @param container [Concurrent::Hash] The container
1077
+ # @param key [Mixed] The key you wish to check for registration with
1078
+ # @return [Bool]
1079
+ #
1080
+ # source://dry-core//lib/dry/core/container/resolver.rb#49
1081
+ def key?(container, key); end
1082
+
1083
+ # An array of registered names for the container
1084
+ #
1085
+ # @api public
1086
+ # @return [Array]
1087
+ #
1088
+ # source://dry-core//lib/dry/core/container/resolver.rb#58
1089
+ def keys(container); end
1090
+ end
1091
+
1092
+ # source://dry-core//lib/dry/core/constants.rb#112
1093
+ Dry::Core::Container::Self = T.let(T.unsafe(nil), Proc)
1094
+
1095
+ # source://dry-core//lib/dry/core/container/stub.rb#6
1096
+ module Dry::Core::Container::Stub
1097
+ # Stubs have already been enabled turning this into a noop
1098
+ #
1099
+ # source://dry-core//lib/dry/core/container/stub.rb#37
1100
+ def enable_stubs!; end
1101
+
1102
+ # Overrides resolve to look into stubbed keys first
1103
+ #
1104
+ # @api public
1105
+ #
1106
+ # source://dry-core//lib/dry/core/container/stub.rb#10
1107
+ def resolve(key); end
1108
+
1109
+ # Add a stub to the container
1110
+ #
1111
+ # source://dry-core//lib/dry/core/container/stub.rb#15
1112
+ def stub(key, value, &block); end
1113
+
1114
+ # Remove stubbed keys from the container
1115
+ #
1116
+ # source://dry-core//lib/dry/core/container/stub.rb#31
1117
+ def unstub(*keys); end
1118
+
1119
+ private
1120
+
1121
+ # Stubs container
1122
+ #
1123
+ # source://dry-core//lib/dry/core/container/stub.rb#44
1124
+ def _stubs; end
1125
+ end
1126
+
1127
+ # source://dry-core//lib/dry/core/constants.rb#112
1128
+ Dry::Core::Container::Undefined = T.let(T.unsafe(nil), Object)
1129
+
1130
+ # An extension for issuing warnings on using deprecated methods.
1131
+ #
1132
+ # @api public
1133
+ # @example
1134
+ #
1135
+ # class Foo
1136
+ # def self.old_class_api; end
1137
+ # def self.new_class_api; end
1138
+ #
1139
+ # deprecate_class_method :old_class_api, :new_class_api
1140
+ #
1141
+ # def old_api; end
1142
+ # def new_api; end
1143
+ #
1144
+ # deprecate :old_api, :new_api, message: "old_api is no-no"
1145
+ # end
1146
+ # @example You also can use this module for your custom messages
1147
+ #
1148
+ # Dry::Core::Deprecations.announce("Foo", "use bar instead")
1149
+ # Dry::Core::Deprecations.warn("Baz is going to be removed soon")
1150
+ #
1151
+ # source://dry-core//lib/dry/core/deprecations.rb#29
1152
+ module Dry::Core::Deprecations
1153
+ class << self
1154
+ # @api public
1155
+ #
1156
+ # source://dry-core//lib/dry/core/deprecations.rb#115
1157
+ def [](tag); end
1158
+
1159
+ # Wraps arguments with a standard message format and prints a warning
1160
+ #
1161
+ # @api public
1162
+ # @param name [Object] what is deprecated
1163
+ # @param msg [String] additional message usually containing upgrade instructions
1164
+ #
1165
+ # source://dry-core//lib/dry/core/deprecations.rb#51
1166
+ def announce(name, msg, tag: T.unsafe(nil), uplevel: T.unsafe(nil)); end
1167
+
1168
+ # @api private
1169
+ #
1170
+ # source://dry-core//lib/dry/core/deprecations.rb#68
1171
+ def deprecated_name_message(old, new = T.unsafe(nil), msg = T.unsafe(nil)); end
1172
+
1173
+ # @api private
1174
+ #
1175
+ # source://dry-core//lib/dry/core/deprecations.rb#60
1176
+ def deprecation_message(name, msg); end
1177
+
1178
+ # Returns the logger used for printing warnings.
1179
+ # You can provide your own with .set_logger!
1180
+ #
1181
+ # @api public
1182
+ # @param output [IO] output stream
1183
+ # @return [Logger]
1184
+ #
1185
+ # source://dry-core//lib/dry/core/deprecations.rb#85
1186
+ def logger(output = T.unsafe(nil)); end
1187
+
1188
+ # Sets a custom logger. This is a global setting.
1189
+ #
1190
+ # @api public
1191
+ # @overload set_logger!
1192
+ # @overload set_logger!
1193
+ # @overload set_logger!
1194
+ #
1195
+ # source://dry-core//lib/dry/core/deprecations.rb#105
1196
+ def set_logger!(output = T.unsafe(nil)); end
1197
+
1198
+ # Prints a warning
1199
+ #
1200
+ # @api public
1201
+ # @param msg [String] Warning string
1202
+ # @param tag [String] Tag to help identify the source of the warning.
1203
+ # Defaults to "deprecated"
1204
+ # @param Caller [Integer] frame to add to the message
1205
+ #
1206
+ # source://dry-core//lib/dry/core/deprecations.rb#39
1207
+ def warn(msg, tag: T.unsafe(nil), uplevel: T.unsafe(nil)); end
1208
+ end
1209
+ end
1210
+
1211
+ # @api public
1212
+ #
1213
+ # source://dry-core//lib/dry/core/deprecations.rb#133
1214
+ module Dry::Core::Deprecations::Interface
1215
+ # Mark instance method as deprecated
1216
+ #
1217
+ # @api public
1218
+ # @option [String]
1219
+ # @param old_name [Symbol] deprecated method
1220
+ # @param new_name [Symbol] replacement (not required)
1221
+ # @param [String] [Hash] a customizable set of options
1222
+ #
1223
+ # source://dry-core//lib/dry/core/deprecations.rb#157
1224
+ def deprecate(old_name, new_name = T.unsafe(nil), message: T.unsafe(nil)); end
1225
+
1226
+ # Mark class-level method as deprecated
1227
+ #
1228
+ # @api public
1229
+ # @option [String]
1230
+ # @param old_name [Symbol] deprecated method
1231
+ # @param new_name [Symbol] replacement (not required)
1232
+ # @param [String] [Hash] a customizable set of options
1233
+ #
1234
+ # source://dry-core//lib/dry/core/deprecations.rb#190
1235
+ def deprecate_class_method(old_name, new_name = T.unsafe(nil), message: T.unsafe(nil)); end
1236
+
1237
+ # Mark a constant as deprecated
1238
+ #
1239
+ # @api public
1240
+ # @option [String]
1241
+ # @param constant_name [Symbol] constant name to be deprecated
1242
+ # @param [String] [Hash] a customizable set of options
1243
+ #
1244
+ # source://dry-core//lib/dry/core/deprecations.rb#212
1245
+ def deprecate_constant(constant_name, message: T.unsafe(nil)); end
1246
+
1247
+ # Sets/gets deprecation tag
1248
+ #
1249
+ # @api public
1250
+ # @option [String,Symbol]
1251
+ # @param [String,Symbol] [Hash] a customizable set of options
1252
+ #
1253
+ # source://dry-core//lib/dry/core/deprecations.rb#137
1254
+ def deprecation_tag(tag = T.unsafe(nil)); end
1255
+
1256
+ # Issue a tagged warning message
1257
+ #
1258
+ # @api public
1259
+ # @param msg [String] warning message
1260
+ #
1261
+ # source://dry-core//lib/dry/core/deprecations.rb#148
1262
+ def warn(msg); end
1263
+ end
1264
+
1265
+ # @api public
1266
+ #
1267
+ # source://dry-core//lib/dry/core/deprecations.rb#30
1268
+ Dry::Core::Deprecations::STACK = T.let(T.unsafe(nil), Proc)
1269
+
1270
+ # @api private
1271
+ #
1272
+ # source://dry-core//lib/dry/core/deprecations.rb#121
1273
+ class Dry::Core::Deprecations::Tagged < ::Module
1274
+ # @api private
1275
+ # @return [Tagged] a new instance of Tagged
1276
+ #
1277
+ # source://dry-core//lib/dry/core/deprecations.rb#122
1278
+ def initialize(tag); end
1279
+
1280
+ # @api private
1281
+ #
1282
+ # source://dry-core//lib/dry/core/deprecations.rb#127
1283
+ def extended(base); end
1284
+ end
1285
+
1286
+ # An implementation of descendants tracker, heavily inspired
1287
+ # by the descendants_tracker gem.
1288
+ #
1289
+ # @example
1290
+ #
1291
+ # class Base
1292
+ # extend Dry::Core::DescendantsTracker
1293
+ # end
1294
+ #
1295
+ # class A < Base
1296
+ # end
1297
+ #
1298
+ # class B < Base
1299
+ # end
1300
+ #
1301
+ # class C < A
1302
+ # end
1303
+ #
1304
+ # Base.descendants # => [C, B, A]
1305
+ # A.descendants # => [C]
1306
+ # B.descendants # => []
1307
+ #
1308
+ # source://dry-core//lib/dry/core/descendants_tracker.rb#29
1309
+ module Dry::Core::DescendantsTracker
1310
+ # Return the descendants of this class
1311
+ #
1312
+ # @api public
1313
+ # @example
1314
+ # descendants = Parent.descendants
1315
+ # @return [Array<Class>]
1316
+ #
1317
+ # source://dry-core//lib/dry/core/descendants_tracker.rb#54
1318
+ def descendants; end
1319
+
1320
+ protected
1321
+
1322
+ # @api private
1323
+ #
1324
+ # source://dry-core//lib/dry/core/descendants_tracker.rb#59
1325
+ def add_descendant(descendant); end
1326
+
1327
+ private
1328
+
1329
+ # @api private
1330
+ #
1331
+ # source://dry-core//lib/dry/core/descendants_tracker.rb#70
1332
+ def inherited(descendant); end
1333
+
1334
+ class << self
1335
+ # @api private
1336
+ #
1337
+ # source://dry-core//lib/dry/core/descendants_tracker.rb#32
1338
+ def setup(target); end
1339
+
1340
+ private
1341
+
1342
+ # @api private
1343
+ # @private
1344
+ #
1345
+ # source://dry-core//lib/dry/core/descendants_tracker.rb#39
1346
+ def extended(base); end
1347
+ end
1348
+ end
1349
+
1350
+ # source://dry-core//lib/dry/core/constants.rb#112
1351
+ Dry::Core::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
1352
+
1353
+ # source://dry-core//lib/dry/core/constants.rb#112
1354
+ Dry::Core::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
1355
+
1356
+ # source://dry-core//lib/dry/core/constants.rb#112
1357
+ Dry::Core::EMPTY_OPTS = T.let(T.unsafe(nil), Hash)
1358
+
1359
+ # source://dry-core//lib/dry/core/constants.rb#112
1360
+ Dry::Core::EMPTY_SET = T.let(T.unsafe(nil), Set)
1361
+
1362
+ # source://dry-core//lib/dry/core/constants.rb#112
1363
+ Dry::Core::EMPTY_STRING = T.let(T.unsafe(nil), String)
1364
+
1365
+ # Define equality, equivalence and inspection methods
1366
+ #
1367
+ # source://dry-core//lib/dry/core/equalizer.rb#6
1368
+ class Dry::Core::Equalizer < ::Module
1369
+ # Initialize an Equalizer with the given keys
1370
+ #
1371
+ # Will use the keys with which it is initialized to define #cmp?,
1372
+ # #hash, and #inspect
1373
+ #
1374
+ # @api private
1375
+ # @option options
1376
+ # @option options
1377
+ # @param keys [Array<Symbol>]
1378
+ # @param options [Hash]
1379
+ # @return [undefined]
1380
+ #
1381
+ # source://dry-core//lib/dry/core/equalizer.rb#20
1382
+ def initialize(*keys, **options); end
1383
+
1384
+ private
1385
+
1386
+ # Define an #cmp? method based on the instance's values identified by #keys
1387
+ #
1388
+ # @api private
1389
+ # @return [undefined]
1390
+ #
1391
+ # source://dry-core//lib/dry/core/equalizer.rb#61
1392
+ def define_cmp_method; end
1393
+
1394
+ # Define a #hash method based on the instance's values identified by #keys
1395
+ #
1396
+ # @api private
1397
+ # @return [undefined]
1398
+ #
1399
+ # source://dry-core//lib/dry/core/equalizer.rb#76
1400
+ def define_hash_method(immutable:); end
1401
+
1402
+ # Define an inspect method that reports the values of the instance's keys
1403
+ #
1404
+ # @api private
1405
+ # @return [undefined]
1406
+ #
1407
+ # source://dry-core//lib/dry/core/equalizer.rb#98
1408
+ def define_inspect_method; end
1409
+
1410
+ # Define the equalizer methods based on #keys
1411
+ #
1412
+ # @api private
1413
+ # @param inspect [Boolean] whether to define #inspect method
1414
+ # @param immutable [Boolean] whether to memoize #hash method
1415
+ # @return [undefined]
1416
+ #
1417
+ # source://dry-core//lib/dry/core/equalizer.rb#50
1418
+ def define_methods(inspect: T.unsafe(nil), immutable: T.unsafe(nil)); end
1419
+
1420
+ # Hook called when module is included
1421
+ #
1422
+ # @api private
1423
+ # @param descendant [Module] the module or class including Equalizer
1424
+ # @return [self]
1425
+ #
1426
+ # source://dry-core//lib/dry/core/equalizer.rb#37
1427
+ def included(descendant); end
1428
+ end
1429
+
1430
+ # The comparison methods
1431
+ #
1432
+ # source://dry-core//lib/dry/core/equalizer.rb#108
1433
+ module Dry::Core::Equalizer::Methods
1434
+ # Compare the object with other object for equivalency
1435
+ #
1436
+ # @api public
1437
+ # @example
1438
+ # object == other # => true or false
1439
+ # @param other [Object] the other object to compare with
1440
+ # @return [Boolean]
1441
+ #
1442
+ # source://dry-core//lib/dry/core/equalizer.rb#135
1443
+ def ==(other); end
1444
+
1445
+ # Compare the object with other object for equality
1446
+ #
1447
+ # @api public
1448
+ # @example
1449
+ # object.eql?(other) # => true or false
1450
+ # @param other [Object] the other object to compare with
1451
+ # @return [Boolean]
1452
+ #
1453
+ # source://dry-core//lib/dry/core/equalizer.rb#120
1454
+ def eql?(other); end
1455
+ end
1456
+
1457
+ # Define extensions that can be later enabled by the user.
1458
+ #
1459
+ # @example
1460
+ #
1461
+ # class Foo
1462
+ # extend Dry::Core::Extensions
1463
+ #
1464
+ # register_extension(:bar) do
1465
+ # def bar; :bar end
1466
+ # end
1467
+ # end
1468
+ #
1469
+ # Foo.new.bar # => NoMethodError
1470
+ # Foo.load_extensions(:bar)
1471
+ # Foo.new.bar # => :bar
1472
+ #
1473
+ # source://dry-core//lib/dry/core/extensions.rb#23
1474
+ module Dry::Core::Extensions
1475
+ # Whether an extension is available
1476
+ #
1477
+ # @param name [Symbol] extension name
1478
+ # @return [Boolean] Extension availability
1479
+ #
1480
+ # source://dry-core//lib/dry/core/extensions.rb#43
1481
+ def available_extension?(name); end
1482
+
1483
+ # Enables specified extensions. Already enabled extensions remain untouched
1484
+ #
1485
+ # @param extensions [Array<Symbol>] list of extension names
1486
+ #
1487
+ # source://dry-core//lib/dry/core/extensions.rb#50
1488
+ def load_extensions(*extensions); end
1489
+
1490
+ # Register an extension
1491
+ #
1492
+ # @param name [Symbol] extension name
1493
+ # @yield extension block. This block guaranteed not to be called more than once
1494
+ #
1495
+ # source://dry-core//lib/dry/core/extensions.rb#35
1496
+ def register_extension(name, &block); end
1497
+
1498
+ class << self
1499
+ # @api private
1500
+ # @private
1501
+ #
1502
+ # source://dry-core//lib/dry/core/extensions.rb#25
1503
+ def extended(obj); end
1504
+ end
1505
+ end
1506
+
1507
+ # source://dry-core//lib/dry/core/constants.rb#112
1508
+ Dry::Core::IDENTITY = T.let(T.unsafe(nil), Proc)
1509
+
1510
+ # Helper module providing thin interface around an inflection backend.
1511
+ #
1512
+ # source://dry-core//lib/dry/core/inflector.rb#6
1513
+ module Dry::Core::Inflector
1514
+ class << self
1515
+ # Transform string to camel case
1516
+ #
1517
+ # @example
1518
+ # Dry::Core::Inflector.camelize('foo_bar') # => 'FooBar'
1519
+ # @param input [String] input string
1520
+ # @return Transformed string
1521
+ #
1522
+ # source://dry-core//lib/dry/core/inflector.rb#72
1523
+ def camelize(input); end
1524
+
1525
+ # Transform a file path to a constant name
1526
+ #
1527
+ # @example
1528
+ # Dry::Core::Inflector.classify('foo/bar') # => 'Foo::Bar'
1529
+ # @param input [String] input string
1530
+ # @return Constant name
1531
+ #
1532
+ # source://dry-core//lib/dry/core/inflector.rb#138
1533
+ def classify(input); end
1534
+
1535
+ # Get a constant value by its name
1536
+ #
1537
+ # @example
1538
+ # Dry::Core::Inflector.constantize('Foo::Bar') # => Foo::Bar
1539
+ # @param input [String] input constant name
1540
+ # @return Constant value
1541
+ #
1542
+ # source://dry-core//lib/dry/core/inflector.rb#127
1543
+ def constantize(input); end
1544
+
1545
+ # Remove namespaces from a constant name
1546
+ #
1547
+ # @example
1548
+ # Dry::Core::Inflector.demodulize('Deeply::Nested::Name') # => 'Name'
1549
+ # @param input [String] input string
1550
+ # @return Unnested constant name
1551
+ #
1552
+ # source://dry-core//lib/dry/core/inflector.rb#116
1553
+ def demodulize(input); end
1554
+
1555
+ # Set up first available backend
1556
+ #
1557
+ # @api private
1558
+ #
1559
+ # source://dry-core//lib/dry/core/inflector.rb#37
1560
+ def detect_backend; end
1561
+
1562
+ # Inflector accessor. Lazily initializes a backend
1563
+ #
1564
+ # @api private
1565
+ #
1566
+ # source://dry-core//lib/dry/core/inflector.rb#61
1567
+ def inflector; end
1568
+
1569
+ # Get a plural form of a word
1570
+ #
1571
+ # @example
1572
+ # Dry::Core::Inflector.pluralize('string') # => 'strings'
1573
+ # @param input [String] input string
1574
+ # @return Transformed string
1575
+ #
1576
+ # source://dry-core//lib/dry/core/inflector.rb#105
1577
+ def pluralize(input); end
1578
+
1579
+ # Try to activate a backend
1580
+ #
1581
+ # @api private
1582
+ #
1583
+ # source://dry-core//lib/dry/core/inflector.rb#26
1584
+ def realize_backend(path, backend_factory); end
1585
+
1586
+ # Set preferred backend
1587
+ #
1588
+ # @param name [Symbol] backend name (:activesupport or :inflecto)
1589
+ #
1590
+ # source://dry-core//lib/dry/core/inflector.rb#50
1591
+ def select_backend(name = T.unsafe(nil)); end
1592
+
1593
+ # Get a singlular form of a word
1594
+ #
1595
+ # @example
1596
+ # Dry::Core::Inflector.singularize('chars') # => 'char'
1597
+ # @param input [String] input string
1598
+ # @return Transformed string
1599
+ #
1600
+ # source://dry-core//lib/dry/core/inflector.rb#94
1601
+ def singularize(input); end
1602
+
1603
+ # Transform string to snake case
1604
+ #
1605
+ # @example
1606
+ # Dry::Core::Inflector.underscore('FooBar') # => 'foo_bar'
1607
+ # @param input [String] input string
1608
+ # @return Transformed string
1609
+ #
1610
+ # source://dry-core//lib/dry/core/inflector.rb#83
1611
+ def underscore(input); end
1612
+ end
1613
+ end
1614
+
1615
+ # List of supported backends
1616
+ #
1617
+ # source://dry-core//lib/dry/core/inflector.rb#8
1618
+ Dry::Core::Inflector::BACKENDS = T.let(T.unsafe(nil), Hash)
1619
+
1620
+ # source://dry-core//lib/dry/core/errors.rb#5
1621
+ class Dry::Core::InvalidClassAttributeValueError < ::StandardError
1622
+ # @return [InvalidClassAttributeValueError] a new instance of InvalidClassAttributeValueError
1623
+ #
1624
+ # source://dry-core//lib/dry/core/errors.rb#6
1625
+ def initialize(name, value); end
1626
+ end
1627
+
1628
+ # source://dry-core//lib/dry/core/memoizable.rb#5
1629
+ module Dry::Core::Memoizable
1630
+ mixes_in_class_methods ::Dry::Core::Memoizable::ClassInterface::Object
1631
+
1632
+ class << self
1633
+ # @private
1634
+ #
1635
+ # source://dry-core//lib/dry/core/memoizable.rb#44
1636
+ def included(klass); end
1637
+ end
1638
+ end
1639
+
1640
+ # source://dry-core//lib/dry/core/memoizable.rb#9
1641
+ module Dry::Core::Memoizable::ClassInterface; end
1642
+
1643
+ # source://dry-core//lib/dry/core/memoizable.rb#10
1644
+ module Dry::Core::Memoizable::ClassInterface::Base
1645
+ # source://dry-core//lib/dry/core/memoizable.rb#15
1646
+ def inherited(base); end
1647
+
1648
+ # source://dry-core//lib/dry/core/memoizable.rb#11
1649
+ def memoize(*names); end
1650
+ end
1651
+
1652
+ # source://dry-core//lib/dry/core/memoizable.rb#23
1653
+ module Dry::Core::Memoizable::ClassInterface::BasicObject
1654
+ include ::Dry::Core::Memoizable::ClassInterface::Base
1655
+
1656
+ # source://dry-core//lib/dry/core/memoizable.rb#26
1657
+ def new(*_arg0, **_arg1); end
1658
+ end
1659
+
1660
+ # source://dry-core//lib/dry/core/memoizable.rb#33
1661
+ module Dry::Core::Memoizable::ClassInterface::Object
1662
+ include ::Dry::Core::Memoizable::ClassInterface::Base
1663
+
1664
+ # source://dry-core//lib/dry/core/memoizable.rb#36
1665
+ def new(*_arg0, **_arg1); end
1666
+ end
1667
+
1668
+ # source://dry-core//lib/dry/core/memoizable.rb#6
1669
+ Dry::Core::Memoizable::MEMOIZED_HASH = T.let(T.unsafe(nil), Hash)
1670
+
1671
+ # @api private
1672
+ #
1673
+ # source://dry-core//lib/dry/core/memoizable.rb#55
1674
+ class Dry::Core::Memoizable::Memoizer < ::Module
1675
+ # @api private
1676
+ # @return [Memoizer] a new instance of Memoizer
1677
+ #
1678
+ # source://dry-core//lib/dry/core/memoizable.rb#63
1679
+ def initialize(klass, names); end
1680
+
1681
+ private
1682
+
1683
+ # @api private
1684
+ #
1685
+ # source://dry-core//lib/dry/core/memoizable.rb#149
1686
+ def declaration(definition, lookup); end
1687
+
1688
+ # @api private
1689
+ #
1690
+ # source://dry-core//lib/dry/core/memoizable.rb#76
1691
+ def define_memoizable(method:); end
1692
+
1693
+ # @api private
1694
+ #
1695
+ # source://dry-core//lib/dry/core/memoizable.rb#181
1696
+ def make_bind_name(idx); end
1697
+
1698
+ # @api private
1699
+ #
1700
+ # source://dry-core//lib/dry/core/memoizable.rb#186
1701
+ def map_bind_type(type, name, original_params, defined_types); end
1702
+
1703
+ # @api private
1704
+ #
1705
+ # source://dry-core//lib/dry/core/memoizable.rb#172
1706
+ def name_from_param(name); end
1707
+
1708
+ # @api private
1709
+ #
1710
+ # source://dry-core//lib/dry/core/memoizable.rb#218
1711
+ def param(name, type); end
1712
+ end
1713
+
1714
+ # @api private
1715
+ #
1716
+ # source://dry-core//lib/dry/core/memoizable.rb#56
1717
+ Dry::Core::Memoizable::Memoizer::KERNEL = T.let(T.unsafe(nil), Hash)
1718
+
1719
+ # source://dry-core//lib/dry/core/memoizable.rb#7
1720
+ Dry::Core::Memoizable::PARAM_PLACEHOLDERS = T.let(T.unsafe(nil), Array)
1721
+
1722
+ # source://dry-core//lib/dry/core/constants.rb#112
1723
+ Dry::Core::Self = T.let(T.unsafe(nil), Proc)
1724
+
1725
+ # source://dry-core//lib/dry/core/constants.rb#112
1726
+ Dry::Core::Undefined = T.let(T.unsafe(nil), Object)
1727
+
1728
+ # source://dry-core//lib/dry/core/version.rb#5
1729
+ Dry::Core::VERSION = T.let(T.unsafe(nil), String)
1730
+
1731
+ module Dry::Types
1732
+ extend ::Dry::Core::Constants
1733
+
1734
+ class << self
1735
+ # source://dry-types/1.8.3/lib/dry/types/constraints.rb#13
1736
+ def Rule(options); end
1737
+
1738
+ # source://dry-types/1.8.3/lib/dry/types.rb#115
1739
+ def [](name); end
1740
+
1741
+ # source://dry-types/1.8.3/lib/dry/types.rb#163
1742
+ def const_missing(const); end
1743
+
1744
+ # source://dry-types/1.8.3/lib/dry/types.rb#82
1745
+ def container; end
1746
+
1747
+ # source://dry-types/1.8.3/lib/dry/types.rb#197
1748
+ def define_builder(method, &block); end
1749
+
1750
+ # source://dry-types/1.8.3/lib/dry/types.rb#149
1751
+ def identifier(klass); end
1752
+
1753
+ # source://dry-types/1.8.3/lib/dry/types.rb#73
1754
+ def included(*_arg0); end
1755
+
1756
+ # source://dry-types/1.8.3/lib/dry/types.rb#33
1757
+ def loader; end
1758
+
1759
+ # source://dry-core//lib/dry/core/deprecations.rb#202
1760
+ def module(*args, &block); end
1761
+
1762
+ # source://dry-types/1.8.3/lib/dry/types.rb#104
1763
+ def register(name, type = T.unsafe(nil), &block); end
1764
+
1765
+ # source://dry-types/1.8.3/lib/dry/types.rb#91
1766
+ def registered?(class_or_identifier); end
1767
+
1768
+ # source://dry-types/1.8.3/lib/dry/types/constraints.rb#26
1769
+ def rule_compiler; end
1770
+
1771
+ # source://dry-types/1.8.3/lib/dry/types.rb#158
1772
+ def type_map; end
1773
+ end
1774
+ end
1775
+
1776
+ class Dry::Types::Compiler
1777
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#11
1778
+ def initialize(registry); end
1779
+
1780
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#15
1781
+ def call(ast); end
1782
+
1783
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#114
1784
+ def compile_fn(fn); end
1785
+
1786
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#9
1787
+ def registry; end
1788
+
1789
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#17
1790
+ def visit(node); end
1791
+
1792
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#110
1793
+ def visit_any(meta); end
1794
+
1795
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#59
1796
+ def visit_array(node); end
1797
+
1798
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#22
1799
+ def visit_constrained(node); end
1800
+
1801
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#28
1802
+ def visit_constructor(node); end
1803
+
1804
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#100
1805
+ def visit_enum(node); end
1806
+
1807
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#65
1808
+ def visit_hash(node); end
1809
+
1810
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#80
1811
+ def visit_json_array(node); end
1812
+
1813
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#75
1814
+ def visit_json_hash(node); end
1815
+
1816
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#95
1817
+ def visit_key(node); end
1818
+
1819
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#34
1820
+ def visit_lax(node); end
1821
+
1822
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#105
1823
+ def visit_map(node); end
1824
+
1825
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#39
1826
+ def visit_nominal(node); end
1827
+
1828
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#90
1829
+ def visit_params_array(node); end
1830
+
1831
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#85
1832
+ def visit_params_hash(node); end
1833
+
1834
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#50
1835
+ def visit_rule(node); end
1836
+
1837
+ # source://dry-core//lib/dry/core/deprecations.rb#168
1838
+ def visit_safe(*args, &block); end
1839
+
1840
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#70
1841
+ def visit_schema(node); end
1842
+
1843
+ # source://dry-types/1.8.3/lib/dry/types/compiler.rb#54
1844
+ def visit_sum(node); end
1845
+ end
1846
+
1847
+ class Dry::Types::Container
1848
+ extend ::Dry::Core::Constants
1849
+ extend ::Dry::Configurable::Methods
1850
+
1851
+ # source://dry-core//lib/dry/core/container/mixin.rb#83
1852
+ def config; end
1853
+ end
1854
+
1855
+ # source://dry-core//lib/dry/core/constants.rb#112
1856
+ Dry::Types::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
1857
+
1858
+ # source://dry-core//lib/dry/core/constants.rb#112
1859
+ Dry::Types::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
1860
+
1861
+ # source://dry-core//lib/dry/core/constants.rb#112
1862
+ Dry::Types::EMPTY_OPTS = T.let(T.unsafe(nil), Hash)
1863
+
1864
+ # source://dry-core//lib/dry/core/constants.rb#112
1865
+ Dry::Types::EMPTY_SET = T.let(T.unsafe(nil), Set)
1866
+
1867
+ # source://dry-core//lib/dry/core/constants.rb#112
1868
+ Dry::Types::EMPTY_STRING = T.let(T.unsafe(nil), String)
1869
+
1870
+ # source://dry-core//lib/dry/core/constants.rb#112
1871
+ Dry::Types::IDENTITY = T.let(T.unsafe(nil), Proc)
1872
+
1873
+ # source://dry-core//lib/dry/core/constants.rb#112
1874
+ Dry::Types::Self = T.let(T.unsafe(nil), Proc)
1875
+
1876
+ module Dry::Types::Type
1877
+ # source://dry-types/1.8.3/lib/dry/types/type.rb#18
1878
+ def ===(input = T.unsafe(nil)); end
1879
+
1880
+ # source://dry-types/1.8.3/lib/dry/types/type.rb#43
1881
+ def [](input = T.unsafe(nil), &_arg1); end
1882
+
1883
+ # source://dry-types/1.8.3/lib/dry/types/type.rb#43
1884
+ def call(input = T.unsafe(nil), &_arg1); end
1885
+
1886
+ # source://dry-core//lib/dry/core/deprecations.rb#168
1887
+ def safe(*args, &block); end
1888
+
1889
+ # source://dry-types/1.8.3/lib/dry/types/type.rb#18
1890
+ def valid?(input = T.unsafe(nil)); end
1891
+ end
1892
+
1893
+ # source://dry-core//lib/dry/core/constants.rb#112
1894
+ Dry::Types::Undefined = T.let(T.unsafe(nil), Object)