diff --git a/Gemfile b/Gemfile index 090f17bef..7a94ab59e 100644 --- a/Gemfile +++ b/Gemfile @@ -29,6 +29,7 @@ gem "ruby-lsp-rails", ">= 0.4" group :deployment, :development do gem "rake" + gem "yard" end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 99e4e3933..270772d4a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -21,11 +21,11 @@ PATH parallel (>= 1.21.0) rbi (>= 0.3.7) require-hooks (>= 0.2.2) + rubydex (>= 0.1.0.beta8) sorbet-static-and-runtime (>= 0.5.11087) spoom (>= 1.7.9) thor (>= 1.2.0) tsort - yard-sorbet GEM remote: https://rubygems.org/ @@ -356,6 +356,9 @@ GEM ruby-lsp-rails (0.4.8) ruby-lsp (>= 0.26.0, < 0.27.0) ruby-progressbar (1.13.0) + rubydex (0.1.0.beta8) + rubydex (0.1.0.beta8-arm64-darwin) + rubydex (0.1.0.beta8-x86_64-linux) securerandom (0.4.1) shopify-money (4.0.0) bigdecimal (>= 3.0) @@ -415,10 +418,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.37) - yard-sorbet (0.9.0) - sorbet-runtime - yard + yard (0.9.38) zeitwerk (2.7.4) zlib (3.2.2) @@ -473,6 +473,7 @@ DEPENDENCIES tapioca! webmock xpath + yard BUNDLED WITH 4.0.7 diff --git a/README.md b/README.md index 995de49a2..eaca2750b 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ All operations performed in working directory. Please review changes and commit them. ``` -This will load your application, find all the gems required by it and generate an RBI file for each gem under the `sorbet/rbi/gems` directory for each of those gems. This process will also import signatures that can be found inside each gem sources, and, optionally, any YARD documentation inside the gem. +This will load your application, find all the gems required by it and generate an RBI file for each gem under the `sorbet/rbi/gems` directory for each of those gems. This process will also import signatures that can be found inside each gem sources, and, optionally, any documentation inside the gem. ```shell @@ -187,7 +187,7 @@ Options: # Default: {"activesupport" => "false"} [--verify], [--no-verify], [--skip-verify] # Verify RBIs are up-to-date # Default: false - [--doc], [--no-doc], [--skip-doc] # Include YARD documentation from sources when generating RBIs. Warning: this might be slow + [--doc], [--no-doc], [--skip-doc] # Include documentation from sources when generating RBIs # Default: true [--loc], [--no-loc], [--skip-loc] # Include comments with source location when generating RBIs # Default: true diff --git a/lib/tapioca/cli.rb b/lib/tapioca/cli.rb index e679aca73..fc52f39ec 100644 --- a/lib/tapioca/cli.rb +++ b/lib/tapioca/cli.rb @@ -225,7 +225,7 @@ def dsl(*constant_or_paths) default: false option :doc, type: :boolean, - desc: "Include YARD documentation from sources when generating RBIs. Warning: this might be slow", + desc: "Include documentation from sources when generating RBIs", default: true option :loc, type: :boolean, diff --git a/lib/tapioca/gem/listeners.rb b/lib/tapioca/gem/listeners.rb index b4686e6ae..abd113ce6 100644 --- a/lib/tapioca/gem/listeners.rb +++ b/lib/tapioca/gem/listeners.rb @@ -14,5 +14,5 @@ require "tapioca/gem/listeners/sorbet_type_variables" require "tapioca/gem/listeners/subconstants" require "tapioca/gem/listeners/foreign_constants" -require "tapioca/gem/listeners/yard_doc" +require "tapioca/gem/listeners/documentation" require "tapioca/gem/listeners/source_location" diff --git a/lib/tapioca/gem/listeners/documentation.rb b/lib/tapioca/gem/listeners/documentation.rb new file mode 100644 index 000000000..0ec1a0a77 --- /dev/null +++ b/lib/tapioca/gem/listeners/documentation.rb @@ -0,0 +1,94 @@ +# typed: strict +# frozen_string_literal: true + +module Tapioca + module Gem + module Listeners + class Documentation < Base + IGNORED_COMMENTS = [ + ":doc:", + ":nodoc:", + "typed:", + "frozen_string_literal:", + "encoding:", + "warn_indent:", + "shareable_constant_value:", + "rubocop:", + "@requires_ancestor:", + ] #: Array[String] + + #: (Pipeline pipeline, Rubydex::Graph gem_graph) -> void + def initialize(pipeline, gem_graph) + super(pipeline) + + @gem_graph = gem_graph + end + + private + + #: (String line) -> bool + def rbs_comment?(line) + line.start_with?(": ", "| ") + end + + # @override + #: (ConstNodeAdded event) -> void + def on_const(event) + event.node.comments = documentation_comments(event.symbol) + end + + # @override + #: (ScopeNodeAdded event) -> void + def on_scope(event) + event.node.comments = documentation_comments(event.symbol) + end + + # @override + #: (MethodNodeAdded event) -> void + def on_method(event) + name = if event.constant.singleton_class? + "#{event.symbol}::<#{event.symbol.split("::").last}>##{event.node.name}()" + else + "#{event.symbol}##{event.node.name}()" + end + event.node.comments = documentation_comments(name, sigs: event.node.sigs) + end + + #: (String name, ?sigs: Array[RBI::Sig]) -> Array[RBI::Comment] + def documentation_comments(name, sigs: []) + declaration = @gem_graph[name] + # For attr_writer methods (name ending in =), fall back to reader docs + if declaration.nil? && name.end_with?("=()") + declaration = @gem_graph[name.delete_suffix("=()") + "()"] + end + # For singleton methods (Class::#method()), fall back to instance method docs. + # This handles module_function and extend self methods which Rubydex indexes + # only under the instance method name. + if declaration.nil? && name.include?("::<") + declaration = @gem_graph[name.sub(/::<[^>]+>#/, "#")] + end + return [] unless declaration + + comments = declaration.definitions.flat_map(&:comments) + comments.uniq! + return [] if comments.empty? + + lines = comments + .map { |comment| comment.string.gsub(/^#+ ?/, "") } + .reject { |line| IGNORED_COMMENTS.any? { |comment| line.include?(comment) } || rbs_comment?(line) } + + # Strip leading and trailing blank lines, matching YARD's behavior + lines = lines.drop_while(&:empty?).reverse.drop_while(&:empty?).reverse + + lines.map! { |line| RBI::Comment.new(line) } + end + + # @override + #: (NodeAdded event) -> bool + def ignore?(event) + event.is_a?(Tapioca::Gem::ForeignScopeNodeAdded) + end + end + end + end +end diff --git a/lib/tapioca/gem/listeners/yard_doc.rb b/lib/tapioca/gem/listeners/yard_doc.rb deleted file mode 100644 index d4f9b4065..000000000 --- a/lib/tapioca/gem/listeners/yard_doc.rb +++ /dev/null @@ -1,110 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Tapioca - module Gem - module Listeners - class YardDoc < Base - IGNORED_COMMENTS = [ - ":doc:", - ":nodoc:", - "typed:", - "frozen_string_literal:", - "encoding:", - "warn_indent:", - "shareable_constant_value:", - "rubocop:", - "@requires_ancestor:", - ] #: Array[String] - - IGNORED_SIG_TAGS = ["param", "return"] #: Array[String] - - #: (Pipeline pipeline) -> void - def initialize(pipeline) - YARD::Registry.clear - super(pipeline) - pipeline.gem.parse_yard_docs - end - - private - - #: (String line) -> bool - def rbs_comment?(line) - line.start_with?(": ", "| ") - end - - # @override - #: (ConstNodeAdded event) -> void - def on_const(event) - event.node.comments = documentation_comments(event.symbol) - end - - # @override - #: (ScopeNodeAdded event) -> void - def on_scope(event) - event.node.comments = documentation_comments(event.symbol) - end - - # @override - #: (MethodNodeAdded event) -> void - def on_method(event) - separator = event.constant.singleton_class? ? "." : "#" - event.node.comments = documentation_comments( - "#{event.symbol}#{separator}#{event.node.name}", - sigs: event.node.sigs, - ) - end - - #: (String name, ?sigs: Array[RBI::Sig]) -> Array[RBI::Comment] - def documentation_comments(name, sigs: []) - yard_docs = YARD::Registry.at(name) - return [] unless yard_docs - - docstring = yard_docs.docstring - return [] if /(copyright|license)/i.match?(docstring) - - comments = docstring.lines - .reject { |line| IGNORED_COMMENTS.any? { |comment| line.include?(comment) } || rbs_comment?(line) } - .map! { |line| RBI::Comment.new(line) } - - tags = yard_docs.tags - tags.reject! { |tag| IGNORED_SIG_TAGS.include?(tag.tag_name) } unless sigs.empty? - - comments << RBI::Comment.new("") if comments.any? && tags.any? - - tags.sort_by { |tag| [tag.tag_name, tag.name.to_s] }.each do |tag| - line = +"@#{tag.tag_name}" - - tag_name = tag.name - line << " #{tag_name}" if tag_name - - tag_types = tag.types - line << " [#{tag_types.join(", ")}]" if tag_types&.any? - - tag_text = tag.text - if tag_text && !tag_text.empty? - text_lines = tag_text.lines - - # Example are a special case because we want the text to start on the next line - line << " #{text_lines.shift&.strip}" unless tag.tag_name == "example" - - text_lines.each do |text_line| - line << "\n #{text_line.strip}" - end - end - - comments << RBI::Comment.new(line) - end - - comments - end - - # @override - #: (NodeAdded event) -> bool - def ignore?(event) - event.is_a?(Tapioca::Gem::ForeignScopeNodeAdded) - end - end - end - end -end diff --git a/lib/tapioca/gem/pipeline.rb b/lib/tapioca/gem/pipeline.rb index a415df757..b3ef9fe26 100644 --- a/lib/tapioca/gem/pipeline.rb +++ b/lib/tapioca/gem/pipeline.rb @@ -32,6 +32,7 @@ def initialize( @payload_symbols = Static::SymbolLoader.payload_symbols #: Set[String] @bootstrap_symbols = load_bootstrap_symbols(@gem) #: Set[String] + gem_graph = Static::SymbolLoader.graph_from_paths(@gem.files) if include_doc @bootstrap_symbols.each { |symbol| push_symbol(symbol) } @@ -46,7 +47,7 @@ def initialize( @node_listeners << Gem::Listeners::SorbetRequiredAncestors.new(self) @node_listeners << Gem::Listeners::SorbetSignatures.new(self) @node_listeners << Gem::Listeners::Subconstants.new(self) - @node_listeners << Gem::Listeners::YardDoc.new(self) if include_doc + @node_listeners << Gem::Listeners::Documentation.new(self, gem_graph) if include_doc @node_listeners << Gem::Listeners::ForeignConstants.new(self) @node_listeners << Gem::Listeners::SourceLocation.new(self) if include_loc @node_listeners << Gem::Listeners::RemoveEmptyPayloadScopes.new(self) diff --git a/lib/tapioca/gemfile.rb b/lib/tapioca/gemfile.rb index b9b2be5cb..6c8413c20 100644 --- a/lib/tapioca/gemfile.rb +++ b/lib/tapioca/gemfile.rb @@ -177,22 +177,6 @@ def contains_path?(path) end end - #: -> void - def parse_yard_docs - files.each do |path| - YARD.parse(path.to_s, [], Logger::Severity::FATAL) - rescue RangeError - # In some circumstances, YARD will raise an error when parsing a file - # that is actually valid Ruby. We don't want tapioca to halt in these - # cases, so we'll rescue the error, pretend like there was no - # documentation, and move on. - # - # This can be removed when https://github.com/lsegal/yard/issues/1536 - # is resolved and released. - [] - end - end - #: -> Array[String] def exported_rbi_files @exported_rbi_files ||= Dir.glob("#{full_gem_path}/rbi/**/*.rbi").sort diff --git a/lib/tapioca/internal.rb b/lib/tapioca/internal.rb index ce6b4af1e..1df72fb4f 100644 --- a/lib/tapioca/internal.rb +++ b/lib/tapioca/internal.rb @@ -41,7 +41,7 @@ require "tempfile" require "thor" require "yaml" -require "yard-sorbet" +require "rubydex" require "prism" require "tapioca/helpers/gem_helper" diff --git a/lib/tapioca/static/symbol_loader.rb b/lib/tapioca/static/symbol_loader.rb index bce33e3e1..a1d9bb368 100644 --- a/lib/tapioca/static/symbol_loader.rb +++ b/lib/tapioca/static/symbol_loader.rb @@ -18,6 +18,19 @@ def payload_symbols T.must(@payload_symbols) end + #: (Array[Pathname] paths) -> Rubydex::Graph + def graph_from_paths(paths) + graph = Rubydex::Graph.new + graph.index_all(paths.map(&:to_s)) + graph.resolve + graph + end + + #: (Gemfile::GemSpec gem) -> Set[String] + def gem_symbols(gem) + symbols_from_paths(gem.files) + end + #: (Gemfile::GemSpec gem) -> Set[String] def engine_symbols(gem) gem_engine = engines.find do |engine| @@ -43,11 +56,6 @@ def engine_symbols(gem) Set.new end - #: (Gemfile::GemSpec gem) -> Set[String] - def gem_symbols(gem) - symbols_from_paths(gem.files) - end - #: (Array[Pathname] paths) -> Set[String] def symbols_from_paths(paths) return Set.new if paths.empty? diff --git a/sorbet/config b/sorbet/config index ccbd49ac0..a4c97516b 100644 --- a/sorbet/config +++ b/sorbet/config @@ -4,3 +4,4 @@ --enable-experimental-requires-ancestor --enable-experimental-rbs-comments --suppress-payload-superclass-redefinition-for=Net::IMAP::CommandData +--suppress-payload-superclass-redefinition-for=RDoc::Markup::Heading diff --git a/sorbet/rbi/gems/aasm@5.5.2.rbi b/sorbet/rbi/gems/aasm@5.5.2.rbi index b5403914a..205983687 100644 --- a/sorbet/rbi/gems/aasm@5.5.2.rbi +++ b/sorbet/rbi/gems/aasm@5.5.2.rbi @@ -57,8 +57,6 @@ end # # pkg:gem/aasm#lib/aasm/base.rb:4 class AASM::Base - # @return [Base] a new instance of Base - # # pkg:gem/aasm#lib/aasm/base.rb:8 def initialize(klass, name, state_machine, options = T.unsafe(nil), &block); end @@ -107,18 +105,20 @@ class AASM::Base # pkg:gem/aasm#lib/aasm/base.rb:75 def initial_state(new_initial_state = T.unsafe(nil)); end - # Returns the value of attribute klass. - # # pkg:gem/aasm#lib/aasm/base.rb:6 def klass; end - # make sure to create a (named) scope for each state + # define a state + # args + # [0] state + # [1] options (or nil) + # or + # [0] state + # [1..] state # # pkg:gem/aasm#lib/aasm/base.rb:90 def state(*args); end - # Returns the value of attribute state_machine. - # # pkg:gem/aasm#lib/aasm/base.rb:6 def state_machine; end @@ -127,14 +127,6 @@ class AASM::Base # pkg:gem/aasm#lib/aasm/persistence/base.rb:60 def state_with_scope(*args); end - # define a state - # args - # [0] state - # [1] options (or nil) - # or - # [0] state - # [1..] state - # # pkg:gem/aasm#lib/aasm/persistence/base.rb:66 def state_without_scope(*args); end @@ -155,8 +147,6 @@ class AASM::Base # pkg:gem/aasm#lib/aasm/persistence/base.rb:75 def create_scope(name); end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/persistence/base.rb:71 def create_scope?(name); end @@ -172,8 +162,6 @@ class AASM::Base # pkg:gem/aasm#lib/aasm/base.rb:246 def namespace; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/base.rb:242 def namespace?; end @@ -194,8 +182,6 @@ end module AASM::ClassMethods # this is the entry point for all state and event definitions # - # @raise [ArgumentError] - # # pkg:gem/aasm#lib/aasm/aasm.rb:28 def aasm(*args, &block); end @@ -227,15 +213,9 @@ class AASM::Configuration # pkg:gem/aasm#lib/aasm/configuration.rb:10 def create_scopes=(_arg0); end - # Returns the value of attribute enum. - # # pkg:gem/aasm#lib/aasm/configuration.rb:36 def enum; end - # Sets the attribute enum - # - # @param value the value to set the attribute enum to. - # # pkg:gem/aasm#lib/aasm/configuration.rb:36 def enum=(_arg0); end @@ -350,15 +330,9 @@ class AASM::Configuration def with_klass=(_arg0); end class << self - # Returns the value of attribute hide_warnings. - # # pkg:gem/aasm#lib/aasm/configuration.rb:45 def hide_warnings; end - # Sets the attribute hide_warnings - # - # @param value the value to set the attribute hide_warnings to. - # # pkg:gem/aasm#lib/aasm/configuration.rb:45 def hide_warnings=(_arg0); end end @@ -371,16 +345,12 @@ module AASM::Core; end class AASM::Core::Event include ::AASM::DslHelper - # @return [Event] a new instance of Event - # # pkg:gem/aasm#lib/aasm/core/event.rb:9 def initialize(name, state_machine, options = T.unsafe(nil), &block); end # pkg:gem/aasm#lib/aasm/core/event.rb:87 def ==(event); end - # Returns the value of attribute default_display_name. - # # pkg:gem/aasm#lib/aasm/core/event.rb:7 def default_display_name; end @@ -403,23 +373,15 @@ class AASM::Core::Event # executes the transition guards to determine if a transition is even # an option given current conditions. # - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/event.rb:46 def may_fire?(obj, to_state = T.unsafe(nil), *args); end - # Returns the value of attribute name. - # # pkg:gem/aasm#lib/aasm/core/event.rb:7 def name; end - # Returns the value of attribute options. - # # pkg:gem/aasm#lib/aasm/core/event.rb:7 def options; end - # Returns the value of attribute state_machine. - # # pkg:gem/aasm#lib/aasm/core/event.rb:7 def state_machine; end @@ -434,16 +396,12 @@ class AASM::Core::Event # pkg:gem/aasm#lib/aasm/core/event.rb:58 def transitions_from_state(state); end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/event.rb:54 def transitions_from_state?(state); end # pkg:gem/aasm#lib/aasm/core/event.rb:66 def transitions_to_state(state); end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/event.rb:62 def transitions_to_state?(state); end @@ -484,8 +442,6 @@ class AASM::Core::Invoker # +record+ - invoking record # +args+ - arguments which will be passed to the callback # - # @return [Invoker] a new instance of Invoker - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:24 def initialize(subject, record, args); end @@ -529,21 +485,15 @@ class AASM::Core::Invoker private - # Returns the value of attribute args. - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:94 def args; end # pkg:gem/aasm#lib/aasm/core/invoker.rb:116 def class_invoker; end - # Returns the value of attribute default_return_value. - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:94 def default_return_value; end - # Returns the value of attribute failures. - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:94 def failures; end @@ -553,24 +503,18 @@ class AASM::Core::Invoker # pkg:gem/aasm#lib/aasm/core/invoker.rb:122 def literal_invoker; end - # Returns the value of attribute options. - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:94 def options; end # pkg:gem/aasm#lib/aasm/core/invoker.rb:110 def proc_invoker; end - # Returns the value of attribute record. - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:94 def record; end # pkg:gem/aasm#lib/aasm/core/invoker.rb:103 def sub_invoke(new_subject); end - # Returns the value of attribute subject. - # # pkg:gem/aasm#lib/aasm/core/invoker.rb:94 def subject; end end @@ -596,18 +540,12 @@ class AASM::Core::Invokers::BaseInvoker # +record+ - invoking record # +args+ - arguments which will be passed to the callback # - # @return [BaseInvoker] a new instance of BaseInvoker - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:23 def initialize(subject, record, args); end - # Returns the value of attribute args. - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:10 def args; end - # Returns the value of attribute failures. - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:10 def failures; end @@ -618,23 +556,16 @@ class AASM::Core::Invokers::BaseInvoker # Execute concrete invoker # - # @raise [NoMethodError] - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:69 def invoke_subject; end # Log failed invoking # - # @raise [NoMethodError] - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:62 def log_failure; end # Check if concrete invoker may be invoked for a specified subject # - # @raise [NoMethodError] - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:55 def may_invoke?; end @@ -643,18 +574,12 @@ class AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:75 def parse_arguments; end - # Returns the value of attribute record. - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:10 def record; end - # Returns the value of attribute result. - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:10 def result; end - # Returns the value of attribute subject. - # # pkg:gem/aasm#lib/aasm/core/invokers/base_invoker.rb:10 def subject; end @@ -679,8 +604,6 @@ class AASM::Core::Invokers::ClassInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/class_invoker.rb:14 def log_failure; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/class_invoker.rb:10 def may_invoke?; end @@ -695,8 +618,6 @@ class AASM::Core::Invokers::ClassInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/class_invoker.rb:55 def instance_with_keyword_args; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/class_invoker.rb:50 def keyword_arguments?; end @@ -724,8 +645,6 @@ class AASM::Core::Invokers::LiteralInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/literal_invoker.rb:14 def log_failure; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/literal_invoker.rb:10 def may_invoke?; end @@ -749,8 +668,6 @@ class AASM::Core::Invokers::LiteralInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/literal_invoker.rb:67 def invoke_with_variable_arity; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/literal_invoker.rb:52 def keyword_arguments?; end @@ -775,8 +692,6 @@ class AASM::Core::Invokers::ProcInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/proc_invoker.rb:14 def log_failure; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/proc_invoker.rb:10 def may_invoke?; end @@ -788,8 +703,6 @@ class AASM::Core::Invokers::ProcInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/proc_invoker.rb:38 def exec_proc_with_keyword_args(parameters_size); end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/proc_invoker.rb:33 def keyword_arguments?; end @@ -802,16 +715,12 @@ class AASM::Core::Invokers::ProcInvoker < ::AASM::Core::Invokers::BaseInvoker # pkg:gem/aasm#lib/aasm/core/invokers/proc_invoker.rb:78 def parameters_to_arity; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/invokers/proc_invoker.rb:29 def support_parameters?; end end # pkg:gem/aasm#lib/aasm/core/state.rb:4 class AASM::Core::State - # @return [State] a new instance of State - # # pkg:gem/aasm#lib/aasm/core/state.rb:7 def initialize(name, klass, state_machine, options = T.unsafe(nil)); end @@ -821,8 +730,6 @@ class AASM::Core::State # pkg:gem/aasm#lib/aasm/core/state.rb:28 def ==(state); end - # Returns the value of attribute default_display_name. - # # pkg:gem/aasm#lib/aasm/core/state.rb:5 def default_display_name; end @@ -841,18 +748,12 @@ class AASM::Core::State # pkg:gem/aasm#lib/aasm/core/state.rb:67 def localized_name; end - # Returns the value of attribute name. - # # pkg:gem/aasm#lib/aasm/core/state.rb:5 def name; end - # Returns the value of attribute options. - # # pkg:gem/aasm#lib/aasm/core/state.rb:5 def options; end - # Returns the value of attribute state_machine. - # # pkg:gem/aasm#lib/aasm/core/state.rb:5 def state_machine; end @@ -877,57 +778,39 @@ end class AASM::Core::Transition include ::AASM::DslHelper - # @return [Transition] a new instance of Transition - # # pkg:gem/aasm#lib/aasm/core/transition.rb:10 def initialize(event, opts, &block); end # pkg:gem/aasm#lib/aasm/core/transition.rb:52 def ==(obj); end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/transition.rb:42 def allowed?(obj, *args); end - # Returns the value of attribute event. - # # pkg:gem/aasm#lib/aasm/core/transition.rb:7 def event; end # pkg:gem/aasm#lib/aasm/core/transition.rb:47 def execute(obj, *args); end - # Returns the value of attribute failures. - # # pkg:gem/aasm#lib/aasm/core/transition.rb:7 def failures; end - # Returns the value of attribute from. - # # pkg:gem/aasm#lib/aasm/core/transition.rb:7 def from; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/core/transition.rb:56 def from?(value); end # pkg:gem/aasm#lib/aasm/core/transition.rb:60 def invoke_success_callbacks(obj, *args); end - # Returns the value of attribute opts. - # # pkg:gem/aasm#lib/aasm/core/transition.rb:8 def options; end - # Returns the value of attribute opts. - # # pkg:gem/aasm#lib/aasm/core/transition.rb:7 def opts; end - # Returns the value of attribute to. - # # pkg:gem/aasm#lib/aasm/core/transition.rb:7 def to; end @@ -953,45 +836,27 @@ end # pkg:gem/aasm#lib/aasm/dsl_helper.rb:4 class AASM::DslHelper::Proxy - # @return [Proxy] a new instance of Proxy - # # pkg:gem/aasm#lib/aasm/dsl_helper.rb:7 def initialize(options, valid_keys, source); end # pkg:gem/aasm#lib/aasm/dsl_helper.rb:14 def method_missing(name, *args, &block); end - # Returns the value of attribute options. - # # pkg:gem/aasm#lib/aasm/dsl_helper.rb:5 def options; end - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # # pkg:gem/aasm#lib/aasm/dsl_helper.rb:5 def options=(_arg0); end end # pkg:gem/aasm#lib/aasm/instance_base.rb:2 class AASM::InstanceBase - # instance of the class including AASM, name of the state machine - # - # @return [InstanceBase] a new instance of InstanceBase - # # pkg:gem/aasm#lib/aasm/instance_base.rb:5 def initialize(instance, name = T.unsafe(nil)); end - # Returns the value of attribute current_event. - # # pkg:gem/aasm#lib/aasm/instance_base.rb:3 def current_event; end - # Sets the attribute current_event - # - # @param value the value to set the attribute current_event to. - # # pkg:gem/aasm#lib/aasm/instance_base.rb:3 def current_event=(_arg0); end @@ -1016,23 +881,15 @@ class AASM::InstanceBase # pkg:gem/aasm#lib/aasm/instance_base.rb:122 def fire!(event_name, *args, &block); end - # Returns the value of attribute from_state. - # # pkg:gem/aasm#lib/aasm/instance_base.rb:3 def from_state; end - # Sets the attribute from_state - # - # @param value the value to set the attribute from_state to. - # # pkg:gem/aasm#lib/aasm/instance_base.rb:3 def from_state=(_arg0); end # pkg:gem/aasm#lib/aasm/instance_base.rb:29 def human_state; end - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/instance_base.rb:108 def may_fire_event?(name, *args); end @@ -1042,67 +899,44 @@ class AASM::InstanceBase # pkg:gem/aasm#lib/aasm/instance_base.rb:128 def set_current_state_with_persistence(state); end - # @raise [AASM::UndefinedState] - # # pkg:gem/aasm#lib/aasm/instance_base.rb:91 def state_object_for_name(name); end # pkg:gem/aasm#lib/aasm/instance_base.rb:33 def states(options = T.unsafe(nil), *args); end - # Returns the value of attribute to_state. - # # pkg:gem/aasm#lib/aasm/instance_base.rb:3 def to_state; end - # Sets the attribute to_state - # - # @param value the value to set the attribute to_state to. - # # pkg:gem/aasm#lib/aasm/instance_base.rb:3 def to_state=(_arg0); end private - # @raise [AASM::UndefinedEvent] - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/instance_base.rb:136 def event_exists?(event_name, bang = T.unsafe(nil)); end end # pkg:gem/aasm#lib/aasm/errors.rb:5 class AASM::InvalidTransition < ::RuntimeError - # @return [InvalidTransition] a new instance of InvalidTransition - # # pkg:gem/aasm#lib/aasm/errors.rb:8 def initialize(object, event_name, state_machine_name, failures = T.unsafe(nil)); end - # Returns the value of attribute event_name. - # # pkg:gem/aasm#lib/aasm/errors.rb:6 def event_name; end - # Returns the value of attribute failures. - # # pkg:gem/aasm#lib/aasm/errors.rb:6 def failures; end - # Returns the value of attribute object. - # # pkg:gem/aasm#lib/aasm/errors.rb:6 def object; end - # Returns the value of attribute originating_state. - # # pkg:gem/aasm#lib/aasm/errors.rb:6 def originating_state; end # pkg:gem/aasm#lib/aasm/errors.rb:14 def reasoning; end - # Returns the value of attribute state_machine_name. - # # pkg:gem/aasm#lib/aasm/errors.rb:6 def state_machine_name; end end @@ -1120,8 +954,6 @@ class AASM::Localizer # pkg:gem/aasm#lib/aasm/localizer.rb:48 def ancestors_list(klass); end - # Can use better arguement name - # # pkg:gem/aasm#lib/aasm/localizer.rb:56 def default_display_name(object); end @@ -1176,8 +1008,6 @@ end module AASM::Persistence::Base mixes_in_class_methods ::AASM::Persistence::Base::ClassMethods - # @return [Boolean] - # # pkg:gem/aasm#lib/aasm/persistence/base.rb:44 def aasm_new_record?; end @@ -1243,8 +1073,6 @@ end # pkg:gem/aasm#lib/aasm/state_machine.rb:2 class AASM::StateMachine - # @return [StateMachine] a new instance of StateMachine - # # pkg:gem/aasm#lib/aasm/state_machine.rb:7 def initialize(name); end @@ -1330,8 +1158,6 @@ end # pkg:gem/aasm#lib/aasm/state_machine_store.rb:4 class AASM::StateMachineStore - # @return [StateMachineStore] a new instance of StateMachineStore - # # pkg:gem/aasm#lib/aasm/state_machine_store.rb:44 def initialize; end @@ -1357,9 +1183,6 @@ class AASM::StateMachineStore # pkg:gem/aasm#lib/aasm/state_machine_store.rb:37 def [](klass, fallback = T.unsafe(nil)); end - # do not overwrite existing state machines, which could have been created by - # inheritance, see AASM::ClassMethods method inherited - # # pkg:gem/aasm#lib/aasm/state_machine_store.rb:26 def []=(klass, overwrite = T.unsafe(nil), state_machine = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/actioncable@8.1.2.rbi b/sorbet/rbi/gems/actioncable@8.1.2.rbi index 5dce8b8d9..0b9efdf2d 100644 --- a/sorbet/rbi/gems/actioncable@8.1.2.rbi +++ b/sorbet/rbi/gems/actioncable@8.1.2.rbi @@ -7,6 +7,28 @@ # :markup: markdown # :include: ../README.md +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown # # pkg:gem/actioncable#lib/action_cable.rb:54 module ActionCable @@ -158,8 +180,6 @@ class ActionCable::Channel::Base extend ::ActionCable::Channel::Broadcasting::ClassMethods extend ::ActiveSupport::Rescuable::ClassMethods - # @return [Base] a new instance of Base - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def initialize(connection, identifier, params = T.unsafe(nil)); end @@ -184,21 +204,15 @@ class ActionCable::Channel::Base # pkg:gem/actioncable#lib/action_cable/channel/base.rb:110 def _unsubscribe_callbacks; end - # Returns the value of attribute connection. - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:117 def connection; end - # Returns the value of attribute identifier. - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:117 def identifier; end # pkg:gem/actioncable#lib/action_cable/channel/base.rb:118 def logger(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute params. - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:117 def params; end @@ -234,8 +248,6 @@ class ActionCable::Channel::Base # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def unsubscribe_from_channel; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def unsubscribed?; end @@ -247,8 +259,6 @@ class ActionCable::Channel::Base # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def defer_subscription_confirmation!; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def defer_subscription_confirmation?; end @@ -267,8 +277,6 @@ class ActionCable::Channel::Base # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def parameter_filter; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def processable_action?(action); end @@ -285,13 +293,9 @@ class ActionCable::Channel::Base # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def subscribed; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def subscription_confirmation_sent?; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/base.rb:154 def subscription_rejected?; end @@ -507,14 +511,6 @@ module ActionCable::Channel::Callbacks::ClassMethods # pkg:gem/actioncable#lib/action_cable/channel/callbacks.rb:67 def before_unsubscribe(*methods, &block); end - # This callback will be triggered after the Base#subscribed method is called, - # even if the subscription was rejected with the Base#reject method. - # - # To trigger the callback only on successful subscriptions, use the - # Base#subscription_rejected? method: - # - # after_subscribe :my_method, unless: :subscription_rejected? - # # pkg:gem/actioncable#lib/action_cable/channel/callbacks.rb:65 def on_subscribe(*methods, &block); end @@ -537,13 +533,9 @@ ActionCable::Channel::Callbacks::INTERNAL_METHODS = T.let(T.unsafe(nil), Array) # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:24 module ActionCable::Channel::ChannelStub - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:25 def confirmed?; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:29 def rejected?; end @@ -555,8 +547,6 @@ module ActionCable::Channel::ChannelStub # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:37 def stop_all_streams; end - # Make periodic timers no-op - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:47 def stop_periodic_timers; end @@ -569,8 +559,6 @@ end # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:50 class ActionCable::Channel::ConnectionStub - # @return [ConnectionStub] a new instance of ConnectionStub - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:55 def initialize(identifiers = T.unsafe(nil)); end @@ -580,31 +568,21 @@ class ActionCable::Channel::ConnectionStub # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:72 def connection_identifier; end - # Returns the value of attribute identifiers. - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:51 def identifiers; end - # Returns the value of attribute logger. - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:51 def logger; end # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:53 def pubsub(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute server. - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:51 def server; end - # Returns the value of attribute subscriptions. - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:51 def subscriptions; end - # Returns the value of attribute transmissions. - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:51 def transmissions; end @@ -643,8 +621,6 @@ end # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:12 class ActionCable::Channel::NonInferrableChannelError < ::StandardError - # @return [NonInferrableChannelError] a new instance of NonInferrableChannelError - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:13 def initialize(name); end end @@ -1137,8 +1113,6 @@ module ActionCable::Channel::TestCase::Behavior::ClassMethods # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:219 def channel_class; end - # @raise [NonInferrableChannelError] - # # pkg:gem/actioncable#lib/action_cable/channel/test_case.rb:227 def determine_default_channel(name); end @@ -1166,8 +1140,6 @@ module ActionCable::Connection::Authorization # Closes the WebSocket connection if it is open and returns an "unauthorized" # reason. # - # @raise [UnauthorizedError] - # # pkg:gem/actioncable#lib/action_cable/connection/authorization.rb:12 def reject_unauthorized_connection; end end @@ -1237,8 +1209,6 @@ class ActionCable::Connection::Base extend ::ActionCable::Connection::Callbacks::ClassMethods extend ::ActiveSupport::Rescuable::ClassMethods - # @return [Base] a new instance of Base - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:67 def initialize(server, env, coder: T.unsafe(nil)); end @@ -1268,8 +1238,6 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:101 def dispatch_websocket_message(websocket_message); end - # Returns the value of attribute env. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:64 def env; end @@ -1291,8 +1259,6 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:168 def inspect; end - # Returns the value of attribute logger. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:64 def logger; end @@ -1316,8 +1282,6 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:85 def process; end - # Returns the value of attribute protocol. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:64 def protocol; end @@ -1345,8 +1309,6 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:131 def send_async(method, *arguments); end - # Returns the value of attribute server. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:64 def server; end @@ -1357,23 +1319,17 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:138 def statistics; end - # Returns the value of attribute subscriptions. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:64 def subscriptions; end # pkg:gem/actioncable#lib/action_cable/connection/base.rb:115 def transmit(cable_message); end - # Returns the value of attribute worker_pool. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:64 def worker_pool; end private - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:228 def allow_request_origin?; end @@ -1401,8 +1357,6 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:279 def invalid_request_message; end - # Returns the value of attribute message_buffer. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:174 def message_buffer; end @@ -1433,8 +1387,6 @@ class ActionCable::Connection::Base # pkg:gem/actioncable#lib/action_cable/connection/base.rb:285 def successful_request_message; end - # Returns the value of attribute websocket. - # # pkg:gem/actioncable#lib/action_cable/connection/base.rb:173 def websocket; end @@ -1549,15 +1501,16 @@ module ActionCable::Connection::Callbacks::ClassMethods def before_command(*methods, &block); end end +# -- +# This class is heavily based on faye-websocket-ruby +# +# Copyright (c) 2010-2015 James Coglan +# # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:13 class ActionCable::Connection::ClientSocket - # @return [ClientSocket] a new instance of ClientSocket - # # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:36 def initialize(env, event_target, event_loop, protocols); end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:114 def alive?; end @@ -1567,8 +1520,6 @@ class ActionCable::Connection::ClientSocket # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:92 def close(code = T.unsafe(nil), reason = T.unsafe(nil)); end - # Returns the value of attribute env. - # # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:34 def env; end @@ -1587,8 +1538,6 @@ class ActionCable::Connection::ClientSocket # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:82 def transmit(message); end - # Returns the value of attribute url. - # # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:34 def url; end @@ -1616,8 +1565,6 @@ class ActionCable::Connection::ClientSocket # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:14 def determine_url(env); end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/client_socket.rb:19 def secure_request?(env); end end @@ -1709,8 +1656,6 @@ end # # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:9 class ActionCable::Connection::MessageBuffer - # @return [MessageBuffer] a new instance of MessageBuffer - # # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:10 def initialize(connection); end @@ -1720,8 +1665,6 @@ class ActionCable::Connection::MessageBuffer # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:31 def process!; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:27 def processing?; end @@ -1730,13 +1673,9 @@ class ActionCable::Connection::MessageBuffer # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:48 def buffer(message); end - # Returns the value of attribute buffered_messages. - # # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:38 def buffered_messages; end - # Returns the value of attribute connection. - # # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:37 def connection; end @@ -1746,24 +1685,23 @@ class ActionCable::Connection::MessageBuffer # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:52 def receive_buffered_messages; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/message_buffer.rb:40 def valid?(message); end end # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:14 class ActionCable::Connection::NonInferrableConnectionError < ::StandardError - # @return [NonInferrableConnectionError] a new instance of NonInferrableConnectionError - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:15 def initialize(name); end end +# -- +# This class is heavily based on faye-websocket-ruby +# +# Copyright (c) 2010-2015 James Coglan +# # pkg:gem/actioncable#lib/action_cable/connection/stream.rb:11 class ActionCable::Connection::Stream - # @return [Stream] a new instance of Stream - # # pkg:gem/actioncable#lib/action_cable/connection/stream.rb:12 def initialize(event_loop, socket); end @@ -1796,8 +1734,6 @@ end # pkg:gem/actioncable#lib/action_cable/connection/stream_event_loop.rb:9 class ActionCable::Connection::StreamEventLoop - # @return [StreamEventLoop] a new instance of StreamEventLoop - # # pkg:gem/actioncable#lib/action_cable/connection/stream_event_loop.rb:10 def initialize; end @@ -1839,8 +1775,6 @@ end # # pkg:gem/actioncable#lib/action_cable/connection/subscriptions.rb:14 class ActionCable::Connection::Subscriptions - # @return [Subscriptions] a new instance of Subscriptions - # # pkg:gem/actioncable#lib/action_cable/connection/subscriptions.rb:15 def initialize(connection); end @@ -1870,16 +1804,12 @@ class ActionCable::Connection::Subscriptions private - # Returns the value of attribute connection. - # # pkg:gem/actioncable#lib/action_cable/connection/subscriptions.rb:73 def connection; end # pkg:gem/actioncable#lib/action_cable/connection/subscriptions.rb:76 def find(data); end - # Returns the value of attribute subscriptions. - # # pkg:gem/actioncable#lib/action_cable/connection/subscriptions.rb:73 def subscriptions; end end @@ -1893,8 +1823,6 @@ end # # pkg:gem/actioncable#lib/action_cable/connection/tagged_logger_proxy.rb:13 class ActionCable::Connection::TaggedLoggerProxy - # @return [TaggedLoggerProxy] a new instance of TaggedLoggerProxy - # # pkg:gem/actioncable#lib/action_cable/connection/tagged_logger_proxy.rb:16 def initialize(logger, tags:); end @@ -1916,8 +1844,6 @@ class ActionCable::Connection::TaggedLoggerProxy # pkg:gem/actioncable#lib/action_cable/connection/tagged_logger_proxy.rb:26 def tag(logger, &block); end - # Returns the value of attribute tags. - # # pkg:gem/actioncable#lib/action_cable/connection/tagged_logger_proxy.rb:14 def tags; end @@ -2096,8 +2022,6 @@ module ActionCable::Connection::TestCase::Behavior::ClassMethods # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:167 def connection_class; end - # @raise [NonInferrableConnectionError] - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:175 def determine_default_connection(name); end @@ -2113,13 +2037,9 @@ module ActionCable::Connection::TestConnection # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:60 def initialize(request); end - # Returns the value of attribute logger. - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:58 def logger; end - # Returns the value of attribute request. - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:58 def request; end end @@ -2145,27 +2065,15 @@ end # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:53 class ActionCable::Connection::TestRequest < ::ActionDispatch::TestRequest - # Returns the value of attribute cookie_jar. - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:54 def cookie_jar; end - # Sets the attribute cookie_jar - # - # @param value the value to set the attribute cookie_jar to. - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:54 def cookie_jar=(_arg0); end - # Returns the value of attribute session. - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:54 def session; end - # Sets the attribute session - # - # @param value the value to set the attribute session to. - # # pkg:gem/actioncable#lib/action_cable/connection/test_case.rb:54 def session=(_arg0); end end @@ -2176,21 +2084,15 @@ end # # pkg:gem/actioncable#lib/action_cable/connection/web_socket.rb:12 class ActionCable::Connection::WebSocket - # @return [WebSocket] a new instance of WebSocket - # # pkg:gem/actioncable#lib/action_cable/connection/web_socket.rb:13 def initialize(env, event_target, event_loop, protocols: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/web_socket.rb:21 def alive?; end # pkg:gem/actioncable#lib/action_cable/connection/web_socket.rb:29 def close(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/connection/web_socket.rb:17 def possible?; end @@ -2205,8 +2107,6 @@ class ActionCable::Connection::WebSocket private - # Returns the value of attribute websocket. - # # pkg:gem/actioncable#lib/action_cable/connection/web_socket.rb:42 def websocket; end end @@ -2280,13 +2180,9 @@ ActionCable::INTERNAL = T.let(T.unsafe(nil), Hash) # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:31 class ActionCable::RemoteConnections - # @return [RemoteConnections] a new instance of RemoteConnections - # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:34 def initialize(server); end - # Returns the value of attribute server. - # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:32 def server; end @@ -2306,8 +2202,6 @@ class ActionCable::RemoteConnections::RemoteConnection include ::ActionCable::Connection::Identification extend ::ActionCable::Connection::Identification::ClassMethods - # @return [RemoteConnection] a new instance of RemoteConnection - # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:52 def initialize(server, ids); end @@ -2327,20 +2221,14 @@ class ActionCable::RemoteConnections::RemoteConnection protected - # Returns the value of attribute server. - # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:68 def server; end private - # @raise [InvalidIdentifiersError] - # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:71 def set_identifier_instance_vars(ids); end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/remote_connections.rb:76 def valid_identifiers?(ids); end @@ -2385,8 +2273,6 @@ class ActionCable::Server::Base include ::ActionCable::Server::Broadcasting include ::ActionCable::Server::Connections - # @return [Base] a new instance of Base - # # pkg:gem/actioncable#lib/action_cable/server/base.rb:31 def initialize(config: T.unsafe(nil)); end @@ -2395,8 +2281,6 @@ class ActionCable::Server::Base # pkg:gem/actioncable#lib/action_cable/server/base.rb:38 def call(env); end - # Returns the value of attribute config. - # # pkg:gem/actioncable#lib/action_cable/server/base.rb:24 def config; end @@ -2418,8 +2302,6 @@ class ActionCable::Server::Base # pkg:gem/actioncable#lib/action_cable/server/base.rb:27 def logger(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute mutex. - # # pkg:gem/actioncable#lib/action_cable/server/base.rb:29 def mutex; end @@ -2510,26 +2392,18 @@ end # pkg:gem/actioncable#lib/action_cable/server/broadcasting.rb:45 class ActionCable::Server::Broadcasting::Broadcaster - # @return [Broadcaster] a new instance of Broadcaster - # # pkg:gem/actioncable#lib/action_cable/server/broadcasting.rb:48 def initialize(server, broadcasting, coder:); end # pkg:gem/actioncable#lib/action_cable/server/broadcasting.rb:52 def broadcast(message); end - # Returns the value of attribute broadcasting. - # # pkg:gem/actioncable#lib/action_cable/server/broadcasting.rb:46 def broadcasting; end - # Returns the value of attribute coder. - # # pkg:gem/actioncable#lib/action_cable/server/broadcasting.rb:46 def coder; end - # Returns the value of attribute server. - # # pkg:gem/actioncable#lib/action_cable/server/broadcasting.rb:46 def server; end end @@ -2542,152 +2416,78 @@ end # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:14 class ActionCable::Server::Configuration - # @return [Configuration] a new instance of Configuration - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:22 def initialize; end - # Returns the value of attribute allow_same_origin_as_host. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def allow_same_origin_as_host; end - # Sets the attribute allow_same_origin_as_host - # - # @param value the value to set the attribute allow_same_origin_as_host to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def allow_same_origin_as_host=(_arg0); end - # Returns the value of attribute allowed_request_origins. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def allowed_request_origins; end - # Sets the attribute allowed_request_origins - # - # @param value the value to set the attribute allowed_request_origins to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def allowed_request_origins=(_arg0); end - # Returns the value of attribute cable. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:18 def cable; end - # Sets the attribute cable - # - # @param value the value to set the attribute cable to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:18 def cable=(_arg0); end - # Returns the value of attribute connection_class. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:16 def connection_class; end - # Sets the attribute connection_class - # - # @param value the value to set the attribute connection_class to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:16 def connection_class=(_arg0); end - # Returns the value of attribute disable_request_forgery_protection. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def disable_request_forgery_protection; end - # Sets the attribute disable_request_forgery_protection - # - # @param value the value to set the attribute disable_request_forgery_protection to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def disable_request_forgery_protection=(_arg0); end - # Returns the value of attribute filter_parameters. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def filter_parameters; end - # Sets the attribute filter_parameters - # - # @param value the value to set the attribute filter_parameters to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:17 def filter_parameters=(_arg0); end - # Returns the value of attribute health_check_application. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:20 def health_check_application; end - # Sets the attribute health_check_application - # - # @param value the value to set the attribute health_check_application to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:20 def health_check_application=(_arg0); end - # Returns the value of attribute health_check_path. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:20 def health_check_path; end - # Sets the attribute health_check_path - # - # @param value the value to set the attribute health_check_path to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:20 def health_check_path=(_arg0); end - # Returns the value of attribute log_tags. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:15 def log_tags; end - # Sets the attribute log_tags - # - # @param value the value to set the attribute log_tags to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:15 def log_tags=(_arg0); end - # Returns the value of attribute logger. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:15 def logger; end - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:15 def logger=(_arg0); end - # Returns the value of attribute mount_path. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:18 def mount_path; end - # Sets the attribute mount_path - # - # @param value the value to set the attribute mount_path to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:18 def mount_path=(_arg0); end - # Returns the value of attribute precompile_assets. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:19 def precompile_assets; end - # Sets the attribute precompile_assets - # - # @param value the value to set the attribute precompile_assets to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:19 def precompile_assets=(_arg0); end @@ -2698,27 +2498,15 @@ class ActionCable::Server::Configuration # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:40 def pubsub_adapter; end - # Returns the value of attribute url. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:18 def url; end - # Sets the attribute url - # - # @param value the value to set the attribute url to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:18 def url=(_arg0); end - # Returns the value of attribute worker_pool_size. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:16 def worker_pool_size; end - # Sets the attribute worker_pool_size - # - # @param value the value to set the attribute worker_pool_size to. - # # pkg:gem/actioncable#lib/action_cable/server/configuration.rb:16 def worker_pool_size=(_arg0); end end @@ -2766,8 +2554,6 @@ class ActionCable::Server::Worker extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker - # @return [Worker] a new instance of Worker - # # pkg:gem/actioncable#lib/action_cable/server/worker.rb:21 def initialize(max_size: T.unsafe(nil)); end @@ -2795,8 +2581,6 @@ class ActionCable::Server::Worker # pkg:gem/actioncable#lib/action_cable/server/worker.rb:15 def connection=(obj); end - # Returns the value of attribute executor. - # # pkg:gem/actioncable#lib/action_cable/server/worker.rb:19 def executor; end @@ -2809,8 +2593,6 @@ class ActionCable::Server::Worker # pkg:gem/actioncable#lib/action_cable/server/worker.rb:58 def invoke(receiver, method, *args, connection:, &block); end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/server/worker.rb:36 def stopping?; end @@ -2872,8 +2654,6 @@ end # pkg:gem/actioncable#lib/action_cable/subscription_adapter/async.rb:13 class ActionCable::SubscriptionAdapter::Async::AsyncSubscriberMap < ::ActionCable::SubscriptionAdapter::SubscriberMap - # @return [AsyncSubscriberMap] a new instance of AsyncSubscriberMap - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/async.rb:14 def initialize(event_loop); end @@ -2886,41 +2666,27 @@ end # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:7 class ActionCable::SubscriptionAdapter::Base - # @return [Base] a new instance of Base - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:10 def initialize(server); end - # @raise [NotImplementedError] - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:15 def broadcast(channel, payload); end # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:31 def identifier; end - # Returns the value of attribute logger. - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:8 def logger; end - # Returns the value of attribute server. - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:8 def server; end - # @raise [NotImplementedError] - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:27 def shutdown; end - # @raise [NotImplementedError] - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:19 def subscribe(channel, message_callback, success_callback = T.unsafe(nil)); end - # @raise [NotImplementedError] - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/base.rb:23 def unsubscribe(channel, message_callback); end end @@ -2946,8 +2712,6 @@ end # pkg:gem/actioncable#lib/action_cable/subscription_adapter/inline.rb:7 class ActionCable::SubscriptionAdapter::Inline < ::ActionCable::SubscriptionAdapter::Base - # @return [Inline] a new instance of Inline - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/inline.rb:8 def initialize(*_arg0); end @@ -2976,8 +2740,6 @@ end class ActionCable::SubscriptionAdapter::Redis < ::ActionCable::SubscriptionAdapter::Base include ::ActionCable::SubscriptionAdapter::ChannelPrefix - # @return [Redis] a new instance of Redis - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/redis.rb:22 def initialize(*_arg0); end @@ -3027,8 +2789,6 @@ end # pkg:gem/actioncable#lib/action_cable/subscription_adapter/redis.rb:67 class ActionCable::SubscriptionAdapter::Redis::Listener < ::ActionCable::SubscriptionAdapter::SubscriberMap - # @return [Listener] a new instance of Listener - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/redis.rb:68 def initialize(adapter, config_options, event_loop); end @@ -3061,8 +2821,6 @@ class ActionCable::SubscriptionAdapter::Redis::Listener < ::ActionCable::Subscri # pkg:gem/actioncable#lib/action_cable/subscription_adapter/redis.rb:197 def resubscribe; end - # @return [Boolean] - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/redis.rb:185 def retry_connecting?; end @@ -3075,8 +2833,6 @@ ActionCable::SubscriptionAdapter::Redis::Listener::CONNECTION_ERRORS = T.let(T.u # pkg:gem/actioncable#lib/action_cable/subscription_adapter/subscriber_map.rb:7 class ActionCable::SubscriptionAdapter::SubscriberMap - # @return [SubscriberMap] a new instance of SubscriberMap - # # pkg:gem/actioncable#lib/action_cable/subscription_adapter/subscriber_map.rb:8 def initialize; end diff --git a/sorbet/rbi/gems/actionmailbox@8.1.2.rbi b/sorbet/rbi/gems/actionmailbox@8.1.2.rbi index faf26ba84..dd7d04aac 100644 --- a/sorbet/rbi/gems/actionmailbox@8.1.2.rbi +++ b/sorbet/rbi/gems/actionmailbox@8.1.2.rbi @@ -185,8 +185,6 @@ class ActionMailbox::Base extend ::ActiveSupport::DescendantsTracker extend ::ActionMailbox::Callbacks::ClassMethods - # @return [Base] a new instance of Base - # # pkg:gem/actionmailbox#lib/action_mailbox/base.rb:79 def initialize(inbound_email); end @@ -218,13 +216,9 @@ class ActionMailbox::Base # pkg:gem/actionmailbox#lib/action_mailbox/base.rb:71 def delivered!(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/actionmailbox#lib/action_mailbox/base.rb:100 def finished_processing?; end - # Returns the value of attribute inbound_email. - # # pkg:gem/actionmailbox#lib/action_mailbox/base.rb:70 def inbound_email; end @@ -674,8 +668,6 @@ module ActionMailbox::Record::GeneratedAttributeMethods; end # # pkg:gem/actionmailbox#lib/action_mailbox/router.rb:8 class ActionMailbox::Router - # @return [Router] a new instance of Router - # # pkg:gem/actionmailbox#lib/action_mailbox/router.rb:11 def initialize; end @@ -693,12 +685,14 @@ class ActionMailbox::Router private - # Returns the value of attribute routes. - # # pkg:gem/actionmailbox#lib/action_mailbox/router.rb:40 def routes; end end +# Encapsulates a route, which can then be matched against an inbound_email and provide a lookup of the matching +# mailbox class. See examples for the different route addresses and how to use them in the ActionMailbox::Base +# documentation. +# # pkg:gem/actionmailbox#lib/action_mailbox/router/route.rb:7 class ActionMailbox::Router::Route # pkg:gem/actionmailbox#lib/action_mailbox/router/route.rb:10 diff --git a/sorbet/rbi/gems/actionmailer@8.1.2.rbi b/sorbet/rbi/gems/actionmailer@8.1.2.rbi index 8cf6a92ab..c5d021319 100644 --- a/sorbet/rbi/gems/actionmailer@8.1.2.rbi +++ b/sorbet/rbi/gems/actionmailer@8.1.2.rbi @@ -513,8 +513,6 @@ end # * deliver_later_queue_name - The queue name used by deliver_later with the default # delivery_job. Mailers can set this to use a custom queue name. # -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# # pkg:gem/actionmailer#lib/action_mailer/base.rb:477 class ActionMailer::Base < ::AbstractController::Base include ::ActionMailer::Callbacks @@ -557,8 +555,6 @@ class ActionMailer::Base < ::AbstractController::Base extend ::ActionView::Rendering::ClassMethods extend ::ActionView::Layouts::ClassMethods - # @return [Base] a new instance of Base - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:639 def initialize; end @@ -999,8 +995,6 @@ class ActionMailer::Base < ::AbstractController::Base # pkg:gem/actionmailer#lib/action_mailer/base.rb:968 def collect_responses(headers, &block); end - # @yield [collector] - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:978 def collect_responses_from_block(headers); end @@ -1133,9 +1127,6 @@ class ActionMailer::Base < ::AbstractController::Base # pkg:gem/actionmailer#lib/action_mailer/base.rb:493 def assets_dir=(arg); end - # Returns the name of the current mailer. This method is also being used as a path for a view lookup. - # If this is an anonymous mailer, this method will return +anonymous+ instead. - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:576 def controller_path; end @@ -1152,10 +1143,6 @@ class ActionMailer::Base < ::AbstractController::Base # pkg:gem/actionmailer#lib/action_mailer/base.rb:493 def default_asset_host_protocol=(arg); end - # Allows to set defaults through app configuration: - # - # config.action_mailer.default_options = { from: "no-reply@example.org" } - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:585 def default_options=(value = T.unsafe(nil)); end @@ -1265,10 +1252,13 @@ class ActionMailer::Base < ::AbstractController::Base # Returns the name of the current mailer. This method is also being used as a path for a view lookup. # If this is an anonymous mailer, this method will return +anonymous+ instead. + # Allows to set the name of current mailer. # # pkg:gem/actionmailer#lib/action_mailer/base.rb:571 def mailer_name; end + # Returns the name of the current mailer. This method is also being used as a path for a view lookup. + # If this is an anonymous mailer, this method will return +anonymous+ instead. # Allows to set the name of current mailer. # # pkg:gem/actionmailer#lib/action_mailer/base.rb:575 @@ -1381,8 +1371,6 @@ class ActionMailer::Base < ::AbstractController::Base # Emails do not support relative path links. # - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:938 def supports_path?; end @@ -1535,8 +1523,6 @@ class ActionMailer::Base < ::AbstractController::Base # pkg:gem/actionmailer#lib/action_mailer/base.rb:559 def observer_class_for(value); end - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:632 def respond_to_missing?(method, include_all = T.unsafe(nil)); end @@ -1568,8 +1554,6 @@ class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator private - # @raise [RuntimeError] - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:769 def _raise_error; end end @@ -1585,8 +1569,6 @@ class ActionMailer::Base::NullMail # pkg:gem/actionmailer#lib/action_mailer/base.rb:667 def method_missing(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/base.rb:663 def respond_to?(string, include_all = T.unsafe(nil)); end end @@ -1645,26 +1627,18 @@ ActionMailer::Callbacks::DEFAULT_INTERNAL_METHODS = T.let(T.unsafe(nil), Array) class ActionMailer::Collector include ::AbstractController::Collector - # @return [Collector] a new instance of Collector - # # pkg:gem/actionmailer#lib/action_mailer/collector.rb:12 def initialize(context, &block); end - # @raise [ArgumentError] - # # pkg:gem/actionmailer#lib/action_mailer/collector.rb:23 def all(*args, &block); end - # @raise [ArgumentError] - # # pkg:gem/actionmailer#lib/action_mailer/collector.rb:18 def any(*args, &block); end # pkg:gem/actionmailer#lib/action_mailer/collector.rb:25 def custom(mime, options = T.unsafe(nil)); end - # Returns the value of attribute responses. - # # pkg:gem/actionmailer#lib/action_mailer/collector.rb:10 def responses; end end @@ -1812,8 +1786,6 @@ end class ActionMailer::InlinePreviewInterceptor include ::Base64 - # @return [InlinePreviewInterceptor] a new instance of InlinePreviewInterceptor - # # pkg:gem/actionmailer#lib/action_mailer/inline_preview_interceptor.rb:26 def initialize(message); end @@ -1831,8 +1803,6 @@ class ActionMailer::InlinePreviewInterceptor # pkg:gem/actionmailer#lib/action_mailer/inline_preview_interceptor.rb:47 def html_part; end - # Returns the value of attribute message. - # # pkg:gem/actionmailer#lib/action_mailer/inline_preview_interceptor.rb:45 def message; end @@ -1982,8 +1952,6 @@ end # # pkg:gem/actionmailer#lib/action_mailer/message_delivery.rb:51 class ActionMailer::MessageDelivery - # @return [MessageDelivery] a new instance of MessageDelivery - # # pkg:gem/actionmailer#lib/action_mailer/message_delivery.rb:54 def initialize(mailer_class, action, *args, **_arg3); end @@ -2087,8 +2055,6 @@ class ActionMailer::MessageDelivery # Was the delegate loaded, causing the mailer action to be processed? # - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/message_delivery.rb:80 def processed?; end @@ -2106,8 +2072,6 @@ end # pkg:gem/actionmailer#lib/action_mailer/test_case.rb:7 class ActionMailer::NonInferrableMailerError < ::StandardError - # @return [NonInferrableMailerError] a new instance of NonInferrableMailerError - # # pkg:gem/actionmailer#lib/action_mailer/test_case.rb:8 def initialize(name); end end @@ -2219,8 +2183,6 @@ end # pkg:gem/actionmailer#lib/action_mailer/parameterized.rb:111 class ActionMailer::Parameterized::Mailer - # @return [Mailer] a new instance of Mailer - # # pkg:gem/actionmailer#lib/action_mailer/parameterized.rb:112 def initialize(mailer, params); end @@ -2229,16 +2191,12 @@ class ActionMailer::Parameterized::Mailer # pkg:gem/actionmailer#lib/action_mailer/parameterized.rb:117 def method_missing(method_name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/parameterized.rb:125 def respond_to_missing?(method, include_all = T.unsafe(nil)); end end # pkg:gem/actionmailer#lib/action_mailer/parameterized.rb:130 class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery - # @return [MessageDelivery] a new instance of MessageDelivery - # # pkg:gem/actionmailer#lib/action_mailer/parameterized.rb:131 def initialize(mailer_class, action, params, *_arg3, **_arg4, &_arg5); end @@ -2255,13 +2213,9 @@ end class ActionMailer::Preview extend ::ActiveSupport::DescendantsTracker - # @return [Preview] a new instance of Preview - # # pkg:gem/actionmailer#lib/action_mailer/preview.rb:74 def initialize(params = T.unsafe(nil)); end - # Returns the value of attribute params. - # # pkg:gem/actionmailer#lib/action_mailer/preview.rb:72 def params; end @@ -2280,8 +2234,6 @@ class ActionMailer::Preview # Returns +true+ if the email exists. # - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/preview.rb:101 def email_exists?(email); end @@ -2292,8 +2244,6 @@ class ActionMailer::Preview # Returns +true+ if the preview exists. # - # @return [Boolean] - # # pkg:gem/actionmailer#lib/action_mailer/preview.rb:106 def exists?(preview); end @@ -2562,8 +2512,6 @@ end # pkg:gem/actionmailer#lib/action_mailer/test_case.rb:48 module ActionMailer::TestCase::Behavior::ClassMethods - # @raise [NonInferrableMailerError] - # # pkg:gem/actionmailer#lib/action_mailer/test_case.rb:68 def determine_default_mailer(name); end diff --git a/sorbet/rbi/gems/actionpack@8.1.2.rbi b/sorbet/rbi/gems/actionpack@8.1.2.rbi index 82d93ba44..4e24e777e 100644 --- a/sorbet/rbi/gems/actionpack@8.1.2.rbi +++ b/sorbet/rbi/gems/actionpack@8.1.2.rbi @@ -5,6 +5,12 @@ # Please instead update this file by running `bin/tapioca gem actionpack`. +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown # :markup: markdown # # pkg:gem/actionpack#lib/abstract_controller/deprecator.rb:5 @@ -26,8 +32,6 @@ end class AbstractController::ActionNotFound < ::StandardError include ::DidYouMean::Correctable - # @return [ActionNotFound] a new instance of ActionNotFound - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:15 def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end @@ -53,8 +57,6 @@ end # their own `render` method, since rendering means different things depending on # the context. # -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# # pkg:gem/actionpack#lib/abstract_controller/base.rb:36 class AbstractController::Base extend ::ActiveSupport::DescendantsTracker @@ -64,8 +66,6 @@ class AbstractController::Base # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def action_methods; end - # Returns the name of the action this controller is processing. - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:43 def action_name; end @@ -83,8 +83,6 @@ class AbstractController::Base # #### Parameters # * `action_name` - The name of an action to be tested # - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def available_action?(action_name); end @@ -99,8 +97,6 @@ class AbstractController::Base # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def controller_path; end - # Returns the formats that can be processed by the controller. - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:47 def formats; end @@ -113,8 +109,6 @@ class AbstractController::Base # Tests if a response body is set. Used to determine if the `process_action` # callback needs to be terminated in AbstractController::Callbacks. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def performed?; end @@ -127,8 +121,6 @@ class AbstractController::Base # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def process(action, *_arg1, **_arg2, &_arg3); end - # Returns the body of the HTTP response sent by the controller. - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:39 def response_body; end @@ -174,8 +166,6 @@ class AbstractController::Base # Checks if the action name is valid and returns false otherwise. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def _valid_action_name?(action_name); end @@ -185,8 +175,6 @@ class AbstractController::Base # #### Parameters # * `name` - The name of an action to be tested # - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:128 def action_method?(name); end @@ -228,8 +216,6 @@ class AbstractController::Base def process_action(*_arg0, **_arg1, &_arg2); end class << self - # Returns the value of attribute abstract. - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:53 def abstract; end @@ -238,8 +224,6 @@ class AbstractController::Base # pkg:gem/actionpack#lib/abstract_controller/base.rb:57 def abstract!; end - # Returns the value of attribute abstract. - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:54 def abstract?; end @@ -264,8 +248,6 @@ class AbstractController::Base # pkg:gem/actionpack#lib/abstract_controller/base.rb:49 def config=(value); end - # @yield [config] - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:122 def configure; end @@ -305,8 +287,6 @@ class AbstractController::Base # subclass of `AbstractController::Base` may return false. An Email controller # for example does not support paths, only full URLs. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/base.rb:191 def supports_path?; end @@ -369,8 +349,6 @@ module AbstractController::Caching::ConfigMethods private - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/caching.rb:24 def cache_configured?; end end @@ -431,8 +409,6 @@ module AbstractController::Caching::Fragments # Check if a cached fragment from the location signified by `key` exists (see # `expire_fragment` for acceptable formats). # - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:105 def fragment_exist?(key, options = T.unsafe(nil)); end @@ -540,28 +516,18 @@ end # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:41 class AbstractController::Callbacks::ActionFilter - # @return [ActionFilter] a new instance of ActionFilter - # # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:42 def initialize(filters, conditional_key, actions); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:71 def after(controller); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:73 def around(controller); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:72 def before(controller); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:48 def match?(controller); end end @@ -775,8 +741,6 @@ end # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:10 class AbstractController::DoubleRenderError < ::AbstractController::Error - # @return [DoubleRenderError] a new instance of DoubleRenderError - # # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:13 def initialize(message = T.unsafe(nil)); end end @@ -816,10 +780,6 @@ end module AbstractController::Helpers::ClassMethods include ::AbstractController::Helpers::Resolution - # Sets the attribute _helpers - # - # @param value the value to set the attribute _helpers to. - # # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:76 def _helpers=(_arg0); end @@ -1049,8 +1009,6 @@ AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.un # pkg:gem/actionpack#lib/abstract_controller/translation.rb:8 module AbstractController::Translation - # Delegates to `I18n.localize`. - # # pkg:gem/actionpack#lib/abstract_controller/translation.rb:40 def l(object, **options); end @@ -1059,15 +1017,6 @@ module AbstractController::Translation # pkg:gem/actionpack#lib/abstract_controller/translation.rb:37 def localize(object, **options); end - # Delegates to `I18n.translate`. - # - # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call `translate(".foo")` from - # `PeopleController#index`, it will convert the call to - # `I18n.translate("people.index.foo")`. This makes it less repetitive to - # translate many keys within the same controller / action and gives you a simple - # framework for scoping them consistently. - # # pkg:gem/actionpack#lib/abstract_controller/translation.rb:34 def t(key, **options); end @@ -1134,8 +1083,38 @@ end # Action Controller provides a base controller class that can be subclassed to # implement filters and actions to handle requests. The result of an action is # typically content generated from views. +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown # -# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:5 +# pkg:gem/actionpack#lib/action_controller/deprecator.rb:5 module ActionController extend ::ActiveSupport::Autoload @@ -1238,8 +1217,6 @@ end # to use any other functionality that is not provided by `ActionController::API` # out of the box. # -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# # pkg:gem/actionpack#lib/action_controller/api.rb:93 class ActionController::API < ::ActionController::Metal include ::ActionView::ViewPaths @@ -1682,30 +1659,20 @@ end # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:73 class ActionController::AllowBrowser::BrowserBlocker - # @return [BrowserBlocker] a new instance of BrowserBlocker - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:80 def initialize(request, versions:); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:84 def blocked?; end - # Returns the value of attribute request. - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:78 def request; end - # Returns the value of attribute versions. - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:78 def versions; end private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:105 def bot?; end @@ -1721,23 +1688,15 @@ class ActionController::AllowBrowser::BrowserBlocker # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:89 def parsed_user_agent; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:97 def unsupported_browser?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:93 def user_agent_version_reported?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:109 def version_below_minimum_required?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:101 def version_guarded_browser?; end end @@ -1812,8 +1771,6 @@ end # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:9 class ActionController::BadRequest < ::ActionController::ActionControllerError - # @return [BadRequest] a new instance of BadRequest - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:10 def initialize(msg = T.unsafe(nil)); end end @@ -2015,8 +1972,6 @@ end # render action: "overthere" # won't be called if monkeys is nil # end # -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# # pkg:gem/actionpack#lib/action_controller/base.rb:208 class ActionController::Base < ::ActionController::Metal include ::ActionView::ViewPaths @@ -3192,8 +3147,6 @@ module ActionController::ConditionalGet # super if stale?(@article, template: "widgets/show") # end # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:236 def stale?(object = T.unsafe(nil), **freshness_kwargs); end @@ -3253,8 +3206,6 @@ module ActionController::ContentSecurityPolicy private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:74 def content_security_policy?; end @@ -3446,13 +3397,9 @@ module ActionController::DataStreaming # 9111](https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control) for the # `Cache-Control` header spec. # - # @raise [MissingFile] - # # pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:77 def send_file(path, options = T.unsafe(nil)); end - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:127 def send_file_headers!(options); end end @@ -3710,15 +3657,11 @@ module ActionController::Head # See `Rack::Utils::SYMBOL_TO_STATUS_CODE` for a full list of valid `status` # symbols. # - # @raise [::AbstractController::DoubleRenderError] - # # pkg:gem/actionpack#lib/action_controller/metal/head.rb:23 def head(status, options = T.unsafe(nil)); end private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/head.rb:58 def include_content?(status); end end @@ -3796,15 +3739,9 @@ module ActionController::Helpers def helpers; end class << self - # Returns the value of attribute helpers_path. - # # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:66 def helpers_path; end - # Sets the attribute helpers_path - # - # @param value the value to set the attribute helpers_path to. - # # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:66 def helpers_path=(_arg0); end end @@ -3964,8 +3901,6 @@ module ActionController::HttpAuthentication::Basic # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:134 def encode_credentials(user_name, password); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:114 def has_basic_credentials?(request); end @@ -3998,8 +3933,6 @@ module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMeth # # See ActionController::HttpAuthentication::Basic for example usage. # - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:79 def http_basic_authenticate_with(name:, password:, realm: T.unsafe(nil), **options); end end @@ -4403,8 +4336,6 @@ module ActionController::ImplicitRender private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/implicit_render.rb:63 def interactive_browser_request?; end end @@ -4588,6 +4519,8 @@ module ActionController::Live mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionController::Live::ClassMethods + # Ensure we clean up any thread locals we copied so that the thread can reused. + # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:413 def clean_up_thread_locals(*args); end @@ -4597,6 +4530,11 @@ module ActionController::Live # pkg:gem/actionpack#lib/action_controller/metal/live.rb:94 def live_streaming_excluded_keys=(val); end + # Spawn a new thread to serve up the controller in. This is to get around the + # fact that Rack isn't based around IOs and we need to use a thread to stream + # data from the response bodies. Nobody should call this method except in Rails + # internals. Seriously! + # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:404 def new_controller_thread; end @@ -4640,17 +4578,12 @@ module ActionController::Live # pkg:gem/actionpack#lib/action_controller/metal/live.rb:421 def log_error(exception); end - # Ensure we clean up any thread locals we copied so that the thread can reused. # Because of the above, we need to prevent the clearing of thread locals, since # no new thread is actually spawned in the test environment. # # pkg:gem/actionpack#lib/action_controller/test_case.rb:34 def original_clean_up_thread_locals(locals, thread); end - # Spawn a new thread to serve up the controller in. This is to get around the - # fact that Rack isn't based around IOs and we need to use a thread to stream - # data from the response bodies. Nobody should call this method except in Rails - # internals. Seriously! # Disable controller / rendering threads in tests. User tests can access the # database on the main thread, so they could open a txn, then the controller # thread will open a new connection and try to access data that's only visible @@ -4683,8 +4616,6 @@ end class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer include ::MonitorMixin - # @return [Buffer] a new instance of Buffer - # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:208 def initialize(response); end @@ -4712,8 +4643,6 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer # The result of calling `write` when this is `false` is determined by # `ignore_disconnect`. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:267 def connected?; end @@ -4755,15 +4684,9 @@ class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer def each_chunk(&block); end class << self - # Returns the value of attribute queue_size. - # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:197 def queue_size; end - # Sets the attribute queue_size - # - # @param value the value to set the attribute queue_size to. - # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:197 def queue_size=(_arg0); end end @@ -4830,8 +4753,6 @@ end # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:153 class ActionController::Live::SSE - # @return [SSE] a new instance of SSE - # # pkg:gem/actionpack#lib/action_controller/metal/live.rb:156 def initialize(stream, options = T.unsafe(nil)); end @@ -5029,24 +4950,16 @@ end # You can refer to the modules included in ActionController::Base to see other # features you can bring into your metal controller. # -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# # pkg:gem/actionpack#lib/action_controller/metal.rb:121 class ActionController::Metal < ::AbstractController::Base include ::ActionController::Testing::Functional - # @return [Metal] a new instance of Metal - # # pkg:gem/actionpack#lib/action_controller/metal.rb:210 def initialize; end - # Delegates to ActionDispatch::Response#content_type - # # pkg:gem/actionpack#lib/action_controller/metal.rb:204 def content_type(*_arg0, **_arg1, &_arg2); end - # Delegates to ActionDispatch::Response#content_type= - # # pkg:gem/actionpack#lib/action_controller/metal.rb:192 def content_type=(arg); end @@ -5058,23 +4971,15 @@ class ActionController::Metal < ::AbstractController::Base # pkg:gem/actionpack#lib/action_controller/metal.rb:249 def dispatch(name, request, response); end - # Delegates to ActionDispatch::Response#headers. - # # pkg:gem/actionpack#lib/action_controller/metal.rb:180 def headers(*_arg0, **_arg1, &_arg2); end - # Delegates to ActionDispatch::Response#location - # # pkg:gem/actionpack#lib/action_controller/metal.rb:200 def location(*_arg0, **_arg1, &_arg2); end - # Delegates to ActionDispatch::Response#location= - # # pkg:gem/actionpack#lib/action_controller/metal.rb:188 def location=(arg); end - # Delegates to ActionDispatch::Response#media_type - # # pkg:gem/actionpack#lib/action_controller/metal.rb:208 def media_type(*_arg0, **_arg1, &_arg2); end @@ -5095,15 +5000,9 @@ class ActionController::Metal < ::AbstractController::Base # Tests if render or redirect has already happened. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal.rb:245 def performed?; end - # :attr_reader: request - # - # The ActionDispatch::Request instance for the current request. - # # pkg:gem/actionpack#lib/action_controller/metal.rb:164 def request; end @@ -5113,10 +5012,6 @@ class ActionController::Metal < ::AbstractController::Base # pkg:gem/actionpack#lib/action_controller/metal.rb:284 def reset_session; end - # :attr_reader: response - # - # The ActionDispatch::Response instance for the current response. - # # pkg:gem/actionpack#lib/action_controller/metal.rb:170 def response; end @@ -5129,15 +5024,9 @@ class ActionController::Metal < ::AbstractController::Base # pkg:gem/actionpack#lib/action_controller/metal.rb:234 def response_body=(body); end - # Delegates to ActionDispatch::Response#status - # # pkg:gem/actionpack#lib/action_controller/metal.rb:227 def response_code(*_arg0, **_arg1, &_arg2); end - # The ActionDispatch::Request::Session instance for the current request. - # See further details in the - # [Active Controller Session guide](https://guides.rubyonrails.org/action_controller_overview.html#session). - # # pkg:gem/actionpack#lib/action_controller/metal.rb:176 def session(*_arg0, **_arg1, &_arg2); end @@ -5147,13 +5036,9 @@ class ActionController::Metal < ::AbstractController::Base # pkg:gem/actionpack#lib/action_controller/metal.rb:257 def set_response!(response); end - # Delegates to ActionDispatch::Response#status - # # pkg:gem/actionpack#lib/action_controller/metal.rb:196 def status(*_arg0, **_arg1, &_arg2); end - # Delegates to ActionDispatch::Response#status= - # # pkg:gem/actionpack#lib/action_controller/metal.rb:184 def status=(arg); end @@ -5238,8 +5123,6 @@ class ActionController::Metal < ::AbstractController::Base # pkg:gem/actionpack#lib/action_controller/metal.rb:288 def __class_attr_middleware_stack=(new_value); end - # @private - # # pkg:gem/actionpack#lib/action_controller/metal.rb:146 def inherited(subclass); end end @@ -5247,8 +5130,6 @@ end # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:52 class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError - # @return [MethodNotAllowed] a new instance of MethodNotAllowed - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:53 def initialize(*allowed_methods); end end @@ -5281,13 +5162,9 @@ ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) # pkg:gem/actionpack#lib/action_controller/metal.rb:19 class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware - # @return [Middleware] a new instance of Middleware - # # pkg:gem/actionpack#lib/action_controller/metal.rb:20 def initialize(klass, args, actions, strategy, block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal.rb:26 def valid?(action); end end @@ -5500,9 +5377,6 @@ module ActionController::MimeResponds # format.html.phone # this gets rendered # end # - # @raise [ArgumentError] - # @yield [collector] - # # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:211 def respond_to(*mimes); end end @@ -5533,8 +5407,6 @@ end class ActionController::MimeResponds::Collector include ::AbstractController::Collector - # @return [Collector] a new instance of Collector - # # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:255 def initialize(mimes, variant = T.unsafe(nil)); end @@ -5544,23 +5416,15 @@ class ActionController::MimeResponds::Collector # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:262 def any(*args, &block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:280 def any_response?; end # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:271 def custom(mime_type, &block); end - # Returns the value of attribute format. - # # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:253 def format; end - # Sets the attribute format - # - # @param value the value to set the attribute format to. - # # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:253 def format=(_arg0); end @@ -5573,8 +5437,6 @@ end # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:301 class ActionController::MimeResponds::Collector::VariantCollector - # @return [VariantCollector] a new instance of VariantCollector - # # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:302 def initialize(variant = T.unsafe(nil)); end @@ -5598,18 +5460,12 @@ end # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:96 class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat - # @return [MissingExactTemplate] a new instance of MissingExactTemplate - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:99 def initialize(message, controller, action_name); end - # Returns the value of attribute action_name. - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:97 def action_name; end - # Returns the value of attribute controller. - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:97 def controller; end end @@ -5621,8 +5477,6 @@ class ActionController::MissingFile < ::ActionController::ActionControllerError; # # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:17 class ActionController::MissingRenderer < ::LoadError - # @return [MissingRenderer] a new instance of MissingRenderer - # # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:18 def initialize(format); end end @@ -5720,8 +5574,6 @@ end # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:25 class ActionController::ParameterMissing < ::KeyError - # @return [ParameterMissing] a new instance of ParameterMissing - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:28 def initialize(param, keys = T.unsafe(nil)); end @@ -5830,8 +5682,6 @@ class ActionController::Parameters # params.permitted? # => true # Person.new(params) # => # # - # @return [Parameters] a new instance of Parameters - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:287 def initialize(parameters = T.unsafe(nil), logging_context = T.unsafe(nil)); end @@ -5906,8 +5756,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1092 def deep_dup; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1027 def deep_merge?(other_hash); end @@ -5933,8 +5781,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:942 def delete(key, &block); end - # Removes items that the block evaluates to true and returns self. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:970 def delete_if(&block); end @@ -5951,9 +5797,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:841 def dig(*keys); end - # Convert all hashes in values into parameters, then yield each pair in the same - # way as `Hash#each_pair`. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:410 def each(&block); end @@ -5978,8 +5821,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1086 def encode_with(coder); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:309 def eql?(other); end @@ -6156,8 +5997,6 @@ class ActionController::Parameters # Returns true if the given value is present for some key in the parameters. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:997 def has_value?(value); end @@ -6173,21 +6012,12 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1055 def inspect; end - # Equivalent to Hash#keep_if, but returns `nil` if no changes were made. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:957 def keep_if(&block); end # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:254 def key?(*_arg0, **_arg1, &_arg2); end - # :method: to_s - # - # :call-seq: - # to_s() - # - # Returns the content of the parameters as a string. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:250 def keys(*_arg0, **_arg1, &_arg2); end @@ -6372,8 +6202,6 @@ class ActionController::Parameters # params.permit! # params.permitted? # => true # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:445 def permitted?; end @@ -6438,53 +6266,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:519 def require(key); end - # This method accepts both a single key and an array of keys. - # - # When passed a single key, if it exists and its associated value is either - # present or the singleton `false`, returns said value: - # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> - # - # Otherwise raises ActionController::ParameterMissing: - # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person - # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person - # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person - # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person - # - # When given an array of keys, the method tries to require each one of them in - # order. If it succeeds, an array with the respective return values is returned: - # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) - # - # Otherwise, the method re-raises the first exception found: - # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: user - # - # This method is not recommended for fetching terminal values because it does - # not permit the values. For example, this can cause problems: - # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL - # - # It is recommended to use `expect` instead: - # - # def person_params - # params.expect(person: :name).require(:name) - # end - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:529 def required(key); end @@ -6566,33 +6347,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:351 def to_hash; end - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query("user") - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs `"key=value"` that conform the query string are sorted - # lexicographically in ascending order. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:384 def to_param(*args); end @@ -6642,16 +6396,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:395 def to_unsafe_h; end - # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess - # representation of the parameters. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:398 def to_unsafe_hash; end @@ -6683,10 +6427,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:898 def transform_values!; end - # Returns true if the given value is present for some key in the parameters. - # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1001 def value?(value); end @@ -6701,25 +6441,12 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1005 def values_at(*keys); end - # Returns a new `ActionController::Parameters` instance with all keys from - # current hash merged into `other_hash`. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1038 def with_defaults(other_hash); end - # Returns the current `ActionController::Parameters` instance with current hash - # merged into `other_hash`. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1046 def with_defaults!(other_hash); end - # Returns a new `ActionController::Parameters` instance that filters out the - # given `keys`. - # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.except(:a, :b) # => #3} permitted: false> - # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:872 def without(*keys); end @@ -6728,13 +6455,9 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1123 def each_nested_attribute; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1119 def nested_attributes?; end - # Returns the value of attribute parameters. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1115 def parameters; end @@ -6743,10 +6466,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1130 def permit_filters(filters, on_unpermitted: T.unsafe(nil), explicit_arrays: T.unsafe(nil)); end - # Sets the attribute permitted - # - # @param value the value to set the attribute permitted to. - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1117 def permitted=(_arg0); end @@ -6776,8 +6495,6 @@ class ActionController::Parameters # # { pies: { flavor: "cherry" } } # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1256 def array_filter?(filter); end @@ -6804,8 +6521,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1150 def new_instance_with_inherited_permitted_status(hash); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1343 def non_scalar?(value); end @@ -6830,8 +6545,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1361 def permit_value(value, filter, on_unpermitted:, explicit_arrays:); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1314 def permitted_scalar?(value); end @@ -6849,8 +6562,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1328 def permitted_scalar_filter(params, permitted_key); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1232 def specify_numeric_keys?(filter); end @@ -6876,8 +6587,6 @@ class ActionController::Parameters # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1059 def hook_into_yaml_loading; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:266 def nested_attribute?(key, value); end @@ -7003,8 +6712,6 @@ module ActionController::ParamsWrapper # Checks if we should perform parameters wrapping. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:289 def _wrapper_enabled?; end @@ -7085,29 +6792,15 @@ ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:88 class ActionController::ParamsWrapper::Options < ::Struct - # @return [Options] a new instance of Options - # # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:97 def initialize(name, format, include, exclude, klass, model); end - # Returns the value of attribute include - # - # @return [Object] the current value of include - # # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:108 def include; end - # Returns the value of attribute model - # - # @return [Object] the current value of model - # # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:104 def model; end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:141 def name; end @@ -7410,8 +7103,6 @@ module ActionController::Redirecting # (includes stack trace to help identify the source) # * `:raise` - Raises an UnsafeRedirectError # - # @raise [ActionControllerError] - # # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:150 def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end @@ -7460,8 +7151,6 @@ module ActionController::Redirecting # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:327 def _handle_path_relative_redirect(url); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:304 def _url_host_allowed?(url); end @@ -7498,16 +7187,12 @@ ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:14 class ActionController::Redirecting::OpenRedirectError < ::ActionController::Redirecting::UnsafeRedirectError - # @return [OpenRedirectError] a new instance of OpenRedirectError - # # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:15 def initialize(location); end end # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:20 class ActionController::Redirecting::PathRelativeRedirectError < ::ActionController::Redirecting::UnsafeRedirectError - # @return [PathRelativeRedirectError] a new instance of PathRelativeRedirectError - # # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:21 def initialize(url); end end @@ -7570,13 +7255,9 @@ class ActionController::Renderer # `Rails.application.config.force_ssl` if `default_url_options` does not specify # a `protocol`. # - # @return [Renderer] a new instance of Renderer - # # pkg:gem/actionpack#lib/action_controller/renderer.rb:110 def initialize(controller, env, defaults); end - # Returns the value of attribute controller. - # # pkg:gem/actionpack#lib/action_controller/renderer.rb:28 def controller; end @@ -7599,9 +7280,6 @@ class ActionController::Renderer # pkg:gem/actionpack#lib/action_controller/renderer.rb:128 def render(*args); end - # Renders a template to a string, just like - # ActionController::Rendering#render_to_string. - # # pkg:gem/actionpack#lib/action_controller/renderer.rb:137 def render_to_string(*args); end @@ -7762,40 +7440,6 @@ end # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:108 module ActionController::Renderers::ClassMethods - # Adds, by name, a renderer or renderers to the `_renderers` available to call - # within controller actions. - # - # It is useful when rendering from an ActionController::Metal controller or - # otherwise to add an available renderer proc to a specific controller. - # - # Both ActionController::Base and ActionController::API include - # ActionController::Renderers::All, making all renderers available in the - # controller. See Renderers::RENDERERS and Renderers.add. - # - # Since ActionController::Metal controllers cannot render, the controller must - # include AbstractController::Rendering, ActionController::Rendering, and - # ActionController::Renderers, and have at least one renderer. - # - # Rather than including ActionController::Renderers::All and including all - # renderers, you may specify which renderers to include by passing the renderer - # name or names to `use_renderers`. For example, a controller that includes only - # the `:json` renderer (`_render_with_renderer_json`) might look like: - # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers - # - # use_renderers :json - # - # def show - # render json: record - # end - # end - # - # You must specify a `use_renderer`, else the `controller.renderer` and - # `controller._renderers` will be `nil`, and the action will fail. - # # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:146 def use_renderer(*args); end @@ -7985,8 +7629,6 @@ module ActionController::Rendering # -- # Check for double render errors and set the content_type after rendering. # - # @raise [::AbstractController::DoubleRenderError] - # # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:171 def render(*args); end @@ -8129,8 +7771,6 @@ module ActionController::RequestForgeryProtection # Checks if any of the authenticity tokens from the request are valid. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:476 def any_authenticity_token_valid?; end @@ -8176,8 +7816,6 @@ module ActionController::RequestForgeryProtection # If the `verify_authenticity_token` before_action ran, verify that JavaScript # responses are only served to same-origin GET requests. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:452 def marked_for_same_origin_verification?; end @@ -8192,8 +7830,6 @@ module ActionController::RequestForgeryProtection # Check for cross-origin JavaScript responses. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:457 def non_xhr_javascript_response?; end @@ -8208,8 +7844,6 @@ module ActionController::RequestForgeryProtection # Checks if the controller allows forgery protection. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:619 def protect_against_forgery?; end @@ -8230,21 +7864,15 @@ module ActionController::RequestForgeryProtection # Checks the client's masked token to see if it matches the session token. # Essentially the inverse of `masked_authenticity_token`. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:509 def valid_authenticity_token?(session, encoded_masked_token); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:561 def valid_per_form_csrf_token?(token, session = T.unsafe(nil)); end # Checks if the request originated from the same origin by looking at the Origin # header. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:635 def valid_request_origin?; end @@ -8255,8 +7883,6 @@ module ActionController::RequestForgeryProtection # params? # * Does the `X-CSRF-Token` header match the form_authenticity_token? # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:470 def verified_request?; end @@ -8417,8 +8043,6 @@ module ActionController::RequestForgeryProtection::ClassMethods private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:255 def is_storage_strategy?(object); end @@ -8431,8 +8055,6 @@ end # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:340 class ActionController::RequestForgeryProtection::CookieStore - # @return [CookieStore] a new instance of CookieStore - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:341 def initialize(cookie = T.unsafe(nil)); end @@ -8457,33 +8079,21 @@ module ActionController::RequestForgeryProtection::ProtectionMethods; end # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:313 class ActionController::RequestForgeryProtection::ProtectionMethods::Exception - # @return [Exception] a new instance of Exception - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:316 def initialize(controller); end - # @raise [ActionController::InvalidAuthenticityToken] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:320 def handle_unverified_request; end - # Returns the value of attribute warning_message. - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:314 def warning_message; end - # Sets the attribute warning_message - # - # @param value the value to set the attribute warning_message to. - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:314 def warning_message=(_arg0); end end # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:261 class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession - # @return [NullSession] a new instance of NullSession - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:262 def initialize(controller); end @@ -8502,8 +8112,6 @@ end # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:277 class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash < ::Rack::Session::Abstract::SessionHash - # @return [NullSessionHash] a new instance of NullSessionHash - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:278 def initialize(req); end @@ -8512,21 +8120,15 @@ class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:285 def destroy; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:291 def enabled?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:287 def exists?; end end # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:303 class ActionController::RequestForgeryProtection::ProtectionMethods::ResetSession - # @return [ResetSession] a new instance of ResetSession - # # pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:304 def initialize(controller); end @@ -8569,8 +8171,6 @@ module ActionController::Rescue # `request.local?` so local requests in production still show the detailed # exception pages. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/metal/rescue.rb:30 def show_detailed_exceptions?; end @@ -8611,8 +8211,6 @@ end # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:88 class ActionController::RespondToMismatchError < ::ActionController::ActionControllerError - # @return [RespondToMismatchError] a new instance of RespondToMismatchError - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:91 def initialize(message = T.unsafe(nil)); end end @@ -8622,21 +8220,15 @@ ActionController::RespondToMismatchError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:19 class ActionController::RoutingError < ::ActionController::ActionControllerError - # @return [RoutingError] a new instance of RoutingError - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:21 def initialize(message, failures = T.unsafe(nil)); end - # Returns the value of attribute failures. - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:20 def failures; end end # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:64 class ActionController::SessionOverflowError < ::ActionController::ActionControllerError - # @return [SessionOverflowError] a new instance of SessionOverflowError - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:67 def initialize(message = T.unsafe(nil)); end end @@ -8905,8 +8497,6 @@ end # pkg:gem/actionpack#lib/action_controller/structured_event_subscriber.rb:4 class ActionController::StructuredEventSubscriber < ::ActiveSupport::StructuredEventSubscriber - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/structured_event_subscriber.rb:91 def exist_fragment?(event); end @@ -8957,8 +8547,6 @@ ActionController::StructuredEventSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(ni # pkg:gem/actionpack#lib/action_controller/template_assertions.rb:6 module ActionController::TemplateAssertions - # @raise [NoMethodError] - # # pkg:gem/actionpack#lib/action_controller/template_assertions.rb:7 def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end end @@ -9017,11 +8605,14 @@ end # ActionController::TestCase will also automatically provide the following # instance variables for use in the tests: # +# @controller # +# @request # You can modify this object before sending the HTTP request. For example, # you might want to set some session properties before sending a GET # request. # +# @response # last HTTP response. In the above example, `@response` becomes valid after # calling `post`. If the various assert methods are not sufficient, then you # may use this object to inspect the HTTP response in detail. @@ -9271,13 +8862,9 @@ module ActionController::TestCase::Behavior # pkg:gem/actionpack#lib/action_controller/test_case.rb:560 def query_parameter_names(generated_extras); end - # Returns the value of attribute request. - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:377 def request; end - # Returns the value of attribute response. - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:377 def response; end @@ -9344,8 +8931,6 @@ end # # pkg:gem/actionpack#lib/action_controller/test_case.rb:46 class ActionController::TestRequest < ::ActionDispatch::TestRequest - # @return [TestRequest] a new instance of TestRequest - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:69 def initialize(env, session, controller_class); end @@ -9355,8 +8940,6 @@ class ActionController::TestRequest < ::ActionDispatch::TestRequest # pkg:gem/actionpack#lib/action_controller/test_case.rb:84 def content_type=(type); end - # Returns the value of attribute controller_class. - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:54 def controller_class; end @@ -9391,11 +8974,10 @@ ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) ActionController::TestRequest::ENCODER = T.let(T.unsafe(nil), T.untyped) # Methods #destroy and #load! are overridden to avoid calling methods on the +# @store object, which does not exist for the TestSession class. # # pkg:gem/actionpack#lib/action_controller/test_case.rb:197 class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash - # @return [TestSession] a new instance of TestSession - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:200 def initialize(session = T.unsafe(nil), id = T.unsafe(nil)); end @@ -9405,13 +8987,9 @@ class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure # pkg:gem/actionpack#lib/action_controller/test_case.rb:224 def dig(*keys); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:233 def enabled?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_controller/test_case.rb:208 def exists?; end @@ -9465,8 +9043,6 @@ class ActionController::TooManyRequests < ::ActionController::ActionControllerEr # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:74 class ActionController::UnfilteredParameters < ::ArgumentError - # @return [UnfilteredParameters] a new instance of UnfilteredParameters - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:75 def initialize; end end @@ -9487,8 +9063,6 @@ class ActionController::UnknownHttpMethod < ::ActionController::ActionController # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:59 class ActionController::UnpermittedParameters < ::IndexError - # @return [UnpermittedParameters] a new instance of UnpermittedParameters - # # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:62 def initialize(params); end @@ -9551,26 +9125,18 @@ end class ActionController::UrlGenerationError < ::ActionController::ActionControllerError include ::DidYouMean::Correctable - # @return [UrlGenerationError] a new instance of UrlGenerationError - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:30 def initialize(message, routes = T.unsafe(nil), route_name = T.unsafe(nil), method_name = T.unsafe(nil)); end # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:41 def corrections; end - # Returns the value of attribute method_name. - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:28 def method_name; end - # Returns the value of attribute route_name. - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:28 def route_name; end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:28 def routes; end end @@ -9583,6 +9149,38 @@ end # defined by the user, and does advanced processing related to HTTP such as # MIME-type negotiation, decoding parameters in POST, PATCH, or PUT bodies, # handling HTTP caching logic, cookies and sessions. +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown # # pkg:gem/actionpack#lib/action_dispatch/deprecator.rb:5 module ActionDispatch @@ -9617,8 +9215,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:9 class ActionDispatch::ActionableExceptions - # @return [ActionableExceptions] a new instance of ActionableExceptions - # # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:12 def initialize(app); end @@ -9633,8 +9229,6 @@ class ActionDispatch::ActionableExceptions private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:26 def actionable_request?(request); end @@ -9660,22 +9254,15 @@ class ActionDispatch::AssertionResponse # or a response status range as a Symbol pseudo-code (:success, indicating any # 200-299 status code). # - # @raise [ArgumentError] - # @return [AssertionResponse] a new instance of AssertionResponse - # # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:22 def initialize(code_or_name); end - # Returns the value of attribute code. - # # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:10 def code; end # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:35 def code_and_name; end - # Returns the value of attribute name. - # # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:10 def name; end @@ -9919,8 +9506,6 @@ module ActionDispatch::Assertions::RoutingAssertions private - # @yield [@routes] - # # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:282 def create_routes(config = T.unsafe(nil)); end @@ -9965,8 +9550,6 @@ module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting private - # @yield [routes] - # # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:58 def create_routes; end @@ -9993,8 +9576,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/assume_ssl.rb:13 class ActionDispatch::AssumeSSL - # @return [AssumeSSL] a new instance of AssumeSSL - # # pkg:gem/actionpack#lib/action_dispatch/middleware/assume_ssl.rb:14 def initialize(app); end @@ -10012,8 +9593,6 @@ class ActionDispatch::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker - # @return [Callbacks] a new instance of Callbacks - # # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:24 def initialize(app); end @@ -10119,10 +9698,6 @@ ActionDispatch::Constants::X_REQUEST_ID = T.let(T.unsafe(nil), String) # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:28 class ActionDispatch::ContentSecurityPolicy - # @return [ContentSecurityPolicy] a new instance of ContentSecurityPolicy - # @yield [_self] - # @yieldparam _self [ActionDispatch::ContentSecurityPolicy] the object that the method was called on - # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:182 def initialize; end @@ -10153,8 +9728,6 @@ class ActionDispatch::ContentSecurityPolicy # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:192 def default_src(*sources); end - # Returns the value of attribute directives. - # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:180 def directives; end @@ -10284,16 +9857,12 @@ class ActionDispatch::ContentSecurityPolicy # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:330 def build_directives(context, nonce, nonce_directives); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:386 def hash_source?(source); end # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:187 def initialize_copy(other); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:382 def nonce_directive?(directive, nonce_directives); end @@ -10321,8 +9890,6 @@ ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:32 class ActionDispatch::ContentSecurityPolicy::Middleware - # @return [Middleware] a new instance of Middleware - # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:33 def initialize(app); end @@ -10334,8 +9901,6 @@ class ActionDispatch::ContentSecurityPolicy::Middleware # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:59 def header_name(request); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:67 def policy_present?(headers); end end @@ -10490,8 +10055,6 @@ ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.uns # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:195 class ActionDispatch::Cookies - # @return [Cookies] a new instance of Cookies - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:702 def initialize(app); end @@ -10506,8 +10069,6 @@ ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(ni class ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::ChainedCookieJars - # @return [AbstractCookieJar] a new instance of AbstractCookieJar - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:509 def initialize(parent_jar); end @@ -10623,16 +10184,12 @@ module ActionDispatch::Cookies::ChainedCookieJars # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:304 def encrypted_cookie_cipher; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:298 def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:308 def signed_cookie_digest; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:291 def upgrade_legacy_hmac_aes_cbc_cookies?; end end @@ -10642,8 +10199,6 @@ class ActionDispatch::Cookies::CookieJar include ::ActionDispatch::Cookies::ChainedCookieJars include ::Enumerable - # @return [CookieJar] a new instance of CookieJar - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:324 def initialize(request); end @@ -10672,8 +10227,6 @@ class ActionDispatch::Cookies::CookieJar # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:334 def commit!; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:332 def committed?; end @@ -10690,8 +10243,6 @@ class ActionDispatch::Cookies::CookieJar # can pass in an options hash to test if a deletion applies to a specific # `:path`, `:domain` etc. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:418 def deleted?(name, options = T.unsafe(nil)); end @@ -10701,18 +10252,12 @@ class ActionDispatch::Cookies::CookieJar # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:349 def fetch(name, *args, &block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:356 def has_key?(name); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:353 def key?(name); end - # Returns the value of attribute request. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:322 def request; end @@ -10741,8 +10286,6 @@ class ActionDispatch::Cookies::CookieJar # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:452 def handle_options(options); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:448 def write_cookie?(cookie); end @@ -10776,8 +10319,6 @@ ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), Str class ActionDispatch::Cookies::EncryptedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::SerializedCookieJars - # @return [EncryptedKeyRotatingCookieJar] a new instance of EncryptedKeyRotatingCookieJar - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:653 def initialize(parent_jar); end @@ -10836,8 +10377,6 @@ module ActionDispatch::Cookies::SerializedCookieJars # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:594 def parse(name, dumped, force_reserialize: T.unsafe(nil), **_arg3); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:588 def reserialize?(dumped); end @@ -10852,8 +10391,6 @@ ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::Messa class ActionDispatch::Cookies::SignedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::SerializedCookieJars - # @return [SignedKeyRotatingCookieJar] a new instance of SignedKeyRotatingCookieJar - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:624 def initialize(parent_jar); end @@ -10879,8 +10416,6 @@ ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:15 class ActionDispatch::DebugExceptions - # @return [DebugExceptions] a new instance of DebugExceptions - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:23 def initialize(app, routes_app = T.unsafe(nil), response_format = T.unsafe(nil), interceptors = T.unsafe(nil)); end @@ -10889,8 +10424,6 @@ class ActionDispatch::DebugExceptions private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:206 def api_request?(content_type); end @@ -10909,8 +10442,6 @@ class ActionDispatch::DebugExceptions # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:138 def log_error(request, wrapper); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:210 def log_rescued_responses?(request); end @@ -10970,8 +10501,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:29 class ActionDispatch::DebugLocks - # @return [DebugLocks] a new instance of DebugLocks - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:30 def initialize(app, path = T.unsafe(nil)); end @@ -10980,8 +10509,6 @@ class ActionDispatch::DebugLocks private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:108 def blocked_by?(victim, blocker, all_threads); end @@ -10991,8 +10518,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:11 class ActionDispatch::DebugView < ::ActionView::Base - # @return [DebugView] a new instance of DebugView - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:14 def initialize(assigns); end @@ -11011,13 +10536,9 @@ class ActionDispatch::DebugView < ::ActionView::Base # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:58 def editor_url(location, line: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:73 def params_valid?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:69 def protect_against_forgery?; end @@ -11030,8 +10551,6 @@ ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS = T.let(T.unsafe(nil), Array) # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:11 class ActionDispatch::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:51 def initialize(backtrace_cleaner, exception); end @@ -11044,21 +10563,15 @@ class ActionDispatch::ExceptionWrapper # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:136 def application_trace; end - # Returns the value of attribute backtrace_cleaner. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:49 def backtrace_cleaner; end # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:90 def corrections; end - # Returns the value of attribute exception. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:49 def exception; end - # Returns the value of attribute exception_class_name. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:49 def exception_class_name; end @@ -11086,13 +10599,9 @@ class ActionDispatch::ExceptionWrapper # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:144 def full_trace; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:74 def has_cause?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:82 def has_corrections?; end @@ -11105,8 +10614,6 @@ class ActionDispatch::ExceptionWrapper # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:86 def original_message; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:200 def rescue_response?; end @@ -11125,13 +10632,9 @@ class ActionDispatch::ExceptionWrapper # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:31 def rescue_templates=(val); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:62 def routing_error?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:185 def show?(request); end @@ -11153,8 +10656,6 @@ class ActionDispatch::ExceptionWrapper # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:70 def sub_template_message; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:66 def template_error?; end @@ -11167,8 +10668,6 @@ class ActionDispatch::ExceptionWrapper # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:106 def unwrapped_exception; end - # Returns the value of attribute wrapped_causes. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:49 def wrapped_causes; end @@ -11180,8 +10679,6 @@ class ActionDispatch::ExceptionWrapper private - # Returns the value of attribute backtrace. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:258 def backtrace; end @@ -11241,8 +10738,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:239 class ActionDispatch::ExceptionWrapper::SourceMapLocation - # @return [SourceMapLocation] a new instance of SourceMapLocation - # # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:240 def initialize(location, template); end @@ -11252,8 +10747,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/executor.rb:8 class ActionDispatch::Executor - # @return [Executor] a new instance of Executor - # # pkg:gem/actionpack#lib/action_dispatch/middleware/executor.rb:9 def initialize(app, executor); end @@ -11279,8 +10772,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:47 class ActionDispatch::FileHandler - # @return [FileHandler] a new instance of FileHandler - # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:55 def initialize(root, index: T.unsafe(nil), headers: T.unsafe(nil), precompressed: T.unsafe(nil), compressible_content_types: T.unsafe(nil)); end @@ -11295,21 +10786,15 @@ class ActionDispatch::FileHandler # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:185 def clean_path(path_info); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:149 def compressible?(content_type); end - # @yield [path, content_type || "text/plain"] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:162 def each_candidate_filepath(path_info); end # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:153 def each_precompressed_filepath(filepath); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:144 def file_readable?(path); end @@ -11397,8 +10882,6 @@ end class ActionDispatch::Flash::FlashHash include ::Enumerable - # @return [FlashHash] a new instance of FlashHash - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:149 def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end @@ -11442,8 +10925,6 @@ class ActionDispatch::Flash::FlashHash # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:209 def each(&block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:200 def empty?; end @@ -11456,8 +10937,6 @@ class ActionDispatch::Flash::FlashHash # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:250 def keep(k = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:183 def key?(name); end @@ -11526,8 +11005,6 @@ class ActionDispatch::Flash::FlashHash protected - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:300 def now_is_loaded?; end @@ -11547,8 +11024,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:90 class ActionDispatch::Flash::FlashNow - # @return [FlashNow] a new instance of FlashNow - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:93 def initialize(flash); end @@ -11563,15 +11038,9 @@ class ActionDispatch::Flash::FlashNow # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:109 def alert=(message); end - # Returns the value of attribute flash. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:91 def flash; end - # Sets the attribute flash - # - # @param value the value to set the attribute flash to. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:91 def flash=(_arg0); end @@ -11625,8 +11094,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:22 class ActionDispatch::HostAuthorization - # @return [HostAuthorization] a new instance of HostAuthorization - # # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:127 def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end @@ -11638,8 +11105,6 @@ class ActionDispatch::HostAuthorization # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:151 def blocked_hosts(request); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:163 def excluded?(request); end @@ -11687,18 +11152,12 @@ ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:35 class ActionDispatch::HostAuthorization::Permissions - # @return [Permissions] a new instance of Permissions - # # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:36 def initialize(hosts); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:44 def allows?(host); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:40 def empty?; end @@ -11736,8 +11195,6 @@ module ActionDispatch::Http::Cache::Request # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:67 def cache_control_directives; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:32 def etag_matches?(etag); end @@ -11748,8 +11205,6 @@ module ActionDispatch::Http::Cache::Request # `config.action_dispatch.strict_freshness`. # Reference: http://tools.ietf.org/html/rfc7232#section-6 # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:45 def fresh?(response); end @@ -11762,8 +11217,6 @@ module ActionDispatch::Http::Cache::Request # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:24 def if_none_match_etags; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:28 def not_modified?(modified_at); end @@ -11788,8 +11241,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:74 class ActionDispatch::Http::Cache::Request::CacheControlDirectives - # @return [CacheControlDirectives] a new instance of CacheControlDirectives - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:75 def initialize(cache_control_header); end @@ -11810,15 +11261,11 @@ class ActionDispatch::Http::Cache::Request::CacheControlDirectives # Returns true if max-stale directive is present (with or without a value) # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:127 def max_stale?; end # Returns true if max-stale directive is present without a value (unlimited staleness) # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:132 def max_stale_unlimited?; end @@ -11833,8 +11280,6 @@ class ActionDispatch::Http::Cache::Request::CacheControlDirectives # This directive indicates that a cache must not use the response # to satisfy subsequent requests without successful validation on the origin server. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:98 def no_cache?; end @@ -11842,16 +11287,12 @@ class ActionDispatch::Http::Cache::Request::CacheControlDirectives # This directive indicates that a cache must not store any part of the # request or response. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:105 def no_store?; end # Returns true if the no-transform directive is present. # This directive indicates that a cache or proxy must not transform the payload. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:111 def no_transform?; end @@ -11860,8 +11301,6 @@ class ActionDispatch::Http::Cache::Request::CacheControlDirectives # stored response. If a valid stored response is not available, # the server should respond with a 504 (Gateway Timeout) status. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:91 def only_if_cached?; end @@ -11886,8 +11325,6 @@ ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:176 module ActionDispatch::Http::Cache::Response - # Returns the value of attribute cache_control. - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:177 def cache_control; end @@ -11897,8 +11334,6 @@ module ActionDispatch::Http::Cache::Response # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:203 def date=(utc_time); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:199 def date?; end @@ -11924,8 +11359,6 @@ module ActionDispatch::Http::Cache::Response # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:225 def etag=(weak_validators); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:237 def etag?; end @@ -11935,8 +11368,6 @@ module ActionDispatch::Http::Cache::Response # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:189 def last_modified=(utc_time); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:185 def last_modified?; end @@ -11946,8 +11377,6 @@ module ActionDispatch::Http::Cache::Response # True if an ETag is set, and it isn't a weak validator (not preceded with # `W/`). # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:246 def strong_etag?; end @@ -11956,8 +11385,6 @@ module ActionDispatch::Http::Cache::Response # True if an ETag is set, and it's a weak validator (preceded with `W/`). # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:240 def weak_etag?; end @@ -12020,21 +11447,15 @@ ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:7 class ActionDispatch::Http::ContentDisposition - # @return [ContentDisposition] a new instance of ContentDisposition - # # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:14 def initialize(disposition:, filename:); end # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:21 def ascii_filename; end - # Returns the value of attribute disposition. - # # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:12 def disposition; end - # Returns the value of attribute filename. - # # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:12 def filename; end @@ -12130,8 +11551,6 @@ module ActionDispatch::Http::FilterRedirect private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:27 def location_filter_match?; end @@ -12171,8 +11590,6 @@ ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) class ActionDispatch::Http::Headers include ::Enumerable - # @return [Headers] a new instance of Headers - # # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:58 def initialize(request); end @@ -12207,13 +11624,9 @@ class ActionDispatch::Http::Headers # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:90 def fetch(key, default = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:80 def include?(key); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:77 def key?(key); end @@ -12317,8 +11730,6 @@ module ActionDispatch::Http::MimeNegotiation # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:194 def formats=(extensions); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:37 def has_content_type?; end @@ -12327,8 +11738,6 @@ module ActionDispatch::Http::MimeNegotiation # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:202 def negotiate_mime(order); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:214 def should_apply_vary_header?; end @@ -12400,8 +11809,6 @@ module ActionDispatch::Http::MimeNegotiation # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:238 def format_from_path_extension; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:223 def params_readable?; end @@ -12435,8 +11842,6 @@ module ActionDispatch::Http::Parameters # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:52 def parameters; end - # Returns both GET and POST parameters in a single hash. - # # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:65 def params; end @@ -12490,8 +11895,6 @@ ActionDispatch::Http::Parameters::PARAMETERS_KEY = T.let(T.unsafe(nil), String) # # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:21 class ActionDispatch::Http::Parameters::ParseError < ::StandardError - # @return [ParseError] a new instance of ParseError - # # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:22 def initialize(message = T.unsafe(nil)); end end @@ -12631,8 +12034,6 @@ module ActionDispatch::Http::URL # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' # req.standard_port? # => false # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:378 def standard_port?; end @@ -12740,8 +12141,6 @@ module ActionDispatch::Http::URL # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:199 def extract_subdomains_from(host, tld_length); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:227 def named_host?(host); end @@ -12875,9 +12274,6 @@ ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) # # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:17 class ActionDispatch::Http::UploadedFile - # @raise [ArgumentError] - # @return [UploadedFile] a new instance of UploadedFile - # # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:31 def initialize(hash); end @@ -12898,8 +12294,6 @@ class ActionDispatch::Http::UploadedFile # Shortcut for `tempfile.eof?`. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:98 def eof?; end @@ -13041,8 +12435,6 @@ module ActionDispatch::Integration::Runner # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:342 def initialize(*args, &blk); end - # Returns the value of attribute app. - # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:339 def app; end @@ -13135,8 +12527,6 @@ module ActionDispatch::Integration::Runner # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:442 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:437 def respond_to_missing?(method, _); end end @@ -13170,8 +12560,6 @@ class ActionDispatch::Integration::Session # Create and initialize a new Session instance. # - # @return [Session] a new instance of Session - # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:133 def initialize(app); end @@ -13216,19 +12604,14 @@ class ActionDispatch::Integration::Session # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:101 def host; end - # Sets the attribute host # Set the host name to use in the next request. # # session.host! "www.example.com" # - # @param value the value to set the attribute host to. - # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:315 def host!(_arg0); end - # Sets the attribute host - # - # @param value the value to set the attribute host to. + # The hostname used in the last request. # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:104 def host=(_arg0); end @@ -13247,8 +12630,6 @@ class ActionDispatch::Integration::Session # ... # end # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:189 def https?; end @@ -13346,8 +12727,6 @@ class ActionDispatch::Integration::Session # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:318 def _mock_session; end - # @yield [location] - # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:326 def build_expanded_path(path); end @@ -13642,6 +13021,8 @@ end # pkg:gem/actionpack#lib/action_dispatch/http/param_error.rb:21 class ActionDispatch::InvalidParameterError < ::ActionDispatch::ParamError; end +# :stopdoc: +# :stopdoc: # :stopdoc: # # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:6 @@ -13649,61 +13030,41 @@ module ActionDispatch::Journey; end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:9 class ActionDispatch::Journey::Ast - # @return [Ast] a new instance of Ast - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:13 def initialize(tree, formatted); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:38 def glob?; end - # Returns the value of attribute names. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 def names; end - # Returns the value of attribute path_params. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 def path_params; end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:25 def requirements=(requirements); end - # Returns the value of attribute tree. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:11 def root; end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:34 def route=(route); end - # Returns the value of attribute terminals. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 def terminals; end - # Returns the value of attribute tree. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 def tree; end - # Returns the value of attribute wildcard_options. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 def wildcard_options; end private - # Returns the value of attribute stars. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:43 def stars; end - # Returns the value of attribute symbols. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:43 def symbols; end @@ -13713,8 +13074,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:8 class ActionDispatch::Journey::Format - # @return [Format] a new instance of Format - # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:24 def initialize(parts); end @@ -13741,33 +13100,15 @@ class ActionDispatch::Journey::Format::Parameter < ::Struct # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:13 def escape(value); end - # Returns the value of attribute escaper - # - # @return [Object] the current value of escaper - # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 def escaper; end - # Sets the attribute escaper - # - # @param value [Object] the value to set the attribute escaper to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 def escaper=(_); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 def name=(_); end @@ -13794,8 +13135,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:12 class ActionDispatch::Journey::Formatter - # @return [Formatter] a new instance of Formatter - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:15 def initialize(routes); end @@ -13808,8 +13147,6 @@ class ActionDispatch::Journey::Formatter # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:61 def generate(name, options, path_parameters); end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:13 def routes; end @@ -13844,57 +13181,39 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:34 class ActionDispatch::Journey::Formatter::MissingRoute - # @return [MissingRoute] a new instance of MissingRoute - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:37 def initialize(constraints, missing_keys, unmatched_keys, routes, name); end - # Returns the value of attribute constraints. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 def constraints; end # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:53 def message; end - # Returns the value of attribute missing_keys. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 def missing_keys; end - # Returns the value of attribute name. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 def name; end # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:49 def params; end - # @raise [ActionController::UrlGenerationError] - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:45 def path(method_name); end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 def routes; end - # Returns the value of attribute unmatched_keys. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 def unmatched_keys; end end # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:20 class ActionDispatch::Journey::Formatter::RouteWithParams - # @return [RouteWithParams] a new instance of RouteWithParams - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:23 def initialize(route, parameterized_parts, params); end - # Returns the value of attribute params. - # # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:21 def params; end @@ -13907,18 +13226,12 @@ module ActionDispatch::Journey::GTG; end # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:10 class ActionDispatch::Journey::GTG::Builder - # @return [Builder] a new instance of Builder - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:15 def initialize(root); end - # Returns the value of attribute ast. - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:13 def ast; end - # Returns the value of attribute endpoints. - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:13 def endpoints; end @@ -13928,13 +13241,9 @@ class ActionDispatch::Journey::GTG::Builder # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:108 def lastpos(node); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:66 def nullable?(node); end - # Returns the value of attribute root. - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:13 def root; end @@ -13955,29 +13264,21 @@ ActionDispatch::Journey::GTG::Builder::DUMMY_END_NODE = T.let(T.unsafe(nil), Act # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:8 class ActionDispatch::Journey::GTG::MatchData - # @return [MatchData] a new instance of MatchData - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:11 def initialize(memos); end - # Returns the value of attribute memos. - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:9 def memos; end end # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:16 class ActionDispatch::Journey::GTG::Simulator - # @return [Simulator] a new instance of Simulator - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:27 def initialize(transition_table); end # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:31 def memos(string); end - # Returns the value of attribute tt. - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:25 def tt; end end @@ -13992,16 +13293,12 @@ ActionDispatch::Journey::GTG::Simulator::STATIC_TOKENS = T.let(T.unsafe(nil), Ar class ActionDispatch::Journey::GTG::TransitionTable include ::ActionDispatch::Journey::NFA::Dot - # @return [TransitionTable] a new instance of TransitionTable - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:17 def initialize; end # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:168 def []=(from, to, sym); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:33 def accepting?(state); end @@ -14023,8 +13320,6 @@ class ActionDispatch::Journey::GTG::TransitionTable # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:41 def memo(idx); end - # Returns the value of attribute memos. - # # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:13 def memos; end @@ -14061,31 +13356,21 @@ module ActionDispatch::Journey::Nodes; end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:182 class ActionDispatch::Journey::Nodes::Binary < ::ActionDispatch::Journey::Nodes::Node - # @return [Binary] a new instance of Binary - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:185 def initialize(left, right); end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:190 def children; end - # Returns the value of attribute right. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:183 def right; end - # Sets the attribute right - # - # @param value the value to set the attribute right to. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:183 def right=(_arg0); end end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:193 class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:194 def cat?; end @@ -14101,21 +13386,15 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:122 class ActionDispatch::Journey::Nodes::Dummy < ::ActionDispatch::Journey::Nodes::Literal - # @return [Dummy] a new instance of Dummy - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:123 def initialize(x = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:127 def literal?; end end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:159 class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:161 def group?; end @@ -14125,8 +13404,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:117 class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:118 def literal?; end @@ -14138,68 +13415,42 @@ end class ActionDispatch::Journey::Nodes::Node include ::Enumerable - # @return [Node] a new instance of Node - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:74 def initialize(left); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:108 def cat?; end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:80 def each(&block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:109 def group?; end - # Returns the value of attribute left. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 def left; end - # Sets the attribute left - # - # @param value the value to set the attribute left to. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 def left=(_arg0); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:105 def literal?; end - # Returns the value of attribute memo. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 def memo; end - # Sets the attribute memo - # - # @param value the value to set the attribute memo to. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 def memo=(_arg0); end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:96 def name; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:107 def star?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:104 def symbol?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:106 def terminal?; end @@ -14212,21 +13463,15 @@ class ActionDispatch::Journey::Nodes::Node # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:92 def to_sym; end - # @raise [NotImplementedError] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:100 def type; end end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:198 class ActionDispatch::Journey::Nodes::Or < ::ActionDispatch::Journey::Nodes::Node - # @return [Or] a new instance of Or - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:201 def initialize(children); end - # Returns the value of attribute children. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:199 def children; end @@ -14242,28 +13487,18 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:164 class ActionDispatch::Journey::Nodes::Star < ::ActionDispatch::Journey::Nodes::Unary - # @return [Star] a new instance of Star - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:167 def initialize(left); end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:177 def name; end - # Returns the value of attribute regexp. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:165 def regexp; end - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:165 def regexp=(_arg0); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:174 def star?; end @@ -14273,35 +13508,21 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:138 class ActionDispatch::Journey::Nodes::Symbol < ::ActionDispatch::Journey::Nodes::Terminal - # @return [Symbol] a new instance of Symbol - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:145 def initialize(left, regexp = T.unsafe(nil)); end - # Returns the value of attribute name. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:141 def name; end - # Returns the value of attribute regexp. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:139 def regexp; end - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:139 def regexp=(_arg0); end - # Returns the value of attribute regexp. - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:140 def symbol; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:152 def symbol?; end @@ -14320,8 +13541,6 @@ class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Node # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:113 def symbol; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:114 def terminal?; end end @@ -14336,8 +13555,6 @@ end class ActionDispatch::Journey::Parser include ::ActionDispatch::Journey::Nodes - # @return [Parser] a new instance of Parser - # # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:15 def initialize; end @@ -14381,21 +13598,15 @@ module ActionDispatch::Journey::Path; end # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:8 class ActionDispatch::Journey::Path::Pattern - # @return [Pattern] a new instance of Pattern - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:11 def initialize(ast, requirements, separators, anchored); end # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:163 def =~(other); end - # Returns the value of attribute anchored. - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 def anchored; end - # Returns the value of attribute ast. - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 def ast; end @@ -14408,13 +13619,9 @@ class ActionDispatch::Journey::Path::Pattern # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:159 def match(other); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:165 def match?(other); end - # Returns the value of attribute names. - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 def names; end @@ -14424,13 +13631,9 @@ class ActionDispatch::Journey::Path::Pattern # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:58 def required_names; end - # Returns the value of attribute requirements. - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 def requirements; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:36 def requirements_anchored?; end @@ -14440,8 +13643,6 @@ class ActionDispatch::Journey::Path::Pattern # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:169 def source; end - # Returns the value of attribute spec. - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 def spec; end @@ -14459,8 +13660,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:68 class ActionDispatch::Journey::Path::Pattern::AnchoredRegexp < ::ActionDispatch::Journey::Visitors::Visitor - # @return [AnchoredRegexp] a new instance of AnchoredRegexp - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:69 def initialize(separator, matchers); end @@ -14494,8 +13693,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:124 class ActionDispatch::Journey::Path::Pattern::MatchData - # @return [MatchData] a new instance of MatchData - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:127 def initialize(names, offsets, match); end @@ -14511,8 +13708,6 @@ class ActionDispatch::Journey::Path::Pattern::MatchData # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:137 def named_captures; end - # Returns the value of attribute names. - # # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:125 def names; end @@ -14534,38 +13729,24 @@ class ActionDispatch::Journey::Route # +path+ is a path constraint. # `constraints` is a hash of constraints to be applied to this route. # - # @return [Route] a new instance of Route - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:79 def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), via: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil), source_location: T.unsafe(nil)); end - # Returns the value of attribute app. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def app; end - # Returns the value of attribute ast. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def ast; end - # Returns the value of attribute constraints. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:12 def conditions; end - # Returns the value of attribute constraints. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def constraints; end - # Returns the value of attribute defaults. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def defaults; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:165 def dispatcher?; end @@ -14575,44 +13756,30 @@ class ActionDispatch::Journey::Route # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:143 def format(path_options); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:161 def glob?; end - # Returns the value of attribute internal. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def internal; end # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:189 def ip; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:169 def matches?(request); end - # Returns the value of attribute name. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def name; end # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:138 def parts; end - # Returns the value of attribute path. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def path; end - # Returns the value of attribute precedence. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def precedence; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:151 def required_default?(key); end @@ -14637,13 +13804,9 @@ class ActionDispatch::Journey::Route # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:116 def requirements; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:193 def requires_matching_verb?; end - # Returns the value of attribute scope_options. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def scope_options; end @@ -14656,8 +13819,6 @@ class ActionDispatch::Journey::Route # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:122 def segments; end - # Returns the value of attribute source_location. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 def source_location; end @@ -14741,16 +13902,12 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:41 class ActionDispatch::Journey::Route::VerbMatchers::Or - # @return [Or] a new instance of Or - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:44 def initialize(verbs); end # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:49 def call(req); end - # Returns the value of attribute verb. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:42 def verb; end end @@ -14812,16 +13969,12 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:26 class ActionDispatch::Journey::Route::VerbMatchers::Unknown - # @return [Unknown] a new instance of Unknown - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:29 def initialize(verb); end # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:33 def call(request); end - # Returns the value of attribute verb. - # # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:27 def verb; end end @@ -14834,8 +13987,6 @@ ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:7 class ActionDispatch::Journey::Router - # @return [Router] a new instance of Router - # # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:19 def initialize(routes); end @@ -14845,15 +13996,9 @@ class ActionDispatch::Journey::Router # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:43 def recognize(req, &block); end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:17 def routes; end - # Sets the attribute routes - # - # @param value the value to set the attribute routes to. - # # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:17 def routes=(_arg0); end @@ -14974,16 +14119,12 @@ ActionDispatch::Journey::Router::Utils::UriEncoder::UTF_8 = T.let(T.unsafe(nil), class ActionDispatch::Journey::Routes include ::Enumerable - # @return [Routes] a new instance of Routes - # # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:14 def initialize(routes = T.unsafe(nil)); end # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:67 def add_route(name, mapping); end - # Returns the value of attribute anchored_routes. - # # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:12 def anchored_routes; end @@ -14993,16 +14134,12 @@ class ActionDispatch::Journey::Routes # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:39 def clear; end - # Returns the value of attribute custom_routes. - # # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:12 def custom_routes; end # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:35 def each(&block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:22 def empty?; end @@ -15015,8 +14152,6 @@ class ActionDispatch::Journey::Routes # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:45 def partition_route(route); end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:12 def routes; end @@ -15037,8 +14172,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:9 class ActionDispatch::Journey::Scanner - # @return [Scanner] a new instance of Scanner - # # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:28 def initialize; end @@ -15056,8 +14189,6 @@ class ActionDispatch::Journey::Scanner private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:69 def next_byte_is_not_a_token?; end @@ -15069,7 +14200,12 @@ end ActionDispatch::Journey::Scanner::STATIC_TOKENS = T.let(T.unsafe(nil), Array) # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:20 -class ActionDispatch::Journey::Scanner::Scanner < ::StringScanner; end +class ActionDispatch::Journey::Scanner::Scanner < ::StringScanner + # https://github.com/ruby/strscan/pull/89 + # + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:22 + def peek_byte; end +end # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:55 module ActionDispatch::Journey::Visitors; end @@ -15101,8 +14237,6 @@ module ActionDispatch::Journey::Visitors; end # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:228 class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - # @return [Dot] a new instance of Dot - # # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:229 def initialize; end @@ -15328,10 +14462,6 @@ end class ActionDispatch::MiddlewareStack include ::Enumerable - # @return [MiddlewareStack] a new instance of MiddlewareStack - # @yield [_self] - # @yieldparam _self [ActionDispatch::MiddlewareStack] the object that the method was called on - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:76 def initialize(*args); end @@ -15372,15 +14502,9 @@ class ActionDispatch::MiddlewareStack # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:89 def last; end - # Returns the value of attribute middlewares. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:74 def middlewares; end - # Sets the attribute middlewares - # - # @param value the value to set the attribute middlewares to. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:74 def middlewares=(_arg0); end @@ -15425,8 +14549,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:54 class ActionDispatch::MiddlewareStack::InstrumentationProxy - # @return [InstrumentationProxy] a new instance of InstrumentationProxy - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:57 def initialize(middleware, class_name); end @@ -15439,21 +14561,15 @@ ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsa # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:15 class ActionDispatch::MiddlewareStack::Middleware - # @return [Middleware] a new instance of Middleware - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:18 def initialize(klass, args, block); end # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:26 def ==(middleware); end - # Returns the value of attribute args. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:16 def args; end - # Returns the value of attribute block. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:16 def block; end @@ -15466,8 +14582,6 @@ class ActionDispatch::MiddlewareStack::Middleware # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:35 def inspect; end - # Returns the value of attribute klass. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:16 def klass; end @@ -15480,8 +14594,6 @@ class ActionDispatch::MissingController < ::NameError; end # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:4 class ActionDispatch::ParamBuilder - # @return [ParamBuilder] a new instance of ParamBuilder - # # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:15 def initialize(param_depth_limit); end @@ -15500,8 +14612,6 @@ class ActionDispatch::ParamBuilder # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:42 def from_query_string(qs, separator: T.unsafe(nil), encoding_template: T.unsafe(nil)); end - # Returns the value of attribute param_depth_limit. - # # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:13 def param_depth_limit; end @@ -15513,18 +14623,12 @@ class ActionDispatch::ParamBuilder # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:167 def new_depth_limit(param_depth_limit); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:175 def params_hash_has_key?(hash, key); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:171 def params_hash_type?(obj); end - # @raise [ParamsTooDeepError] - # # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:77 def store_nested_param(params, name, v, depth, encoding_template = T.unsafe(nil)); end @@ -15550,6 +14654,10 @@ class ActionDispatch::ParamBuilder # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:33 def ignore_leading_brackets=(value); end + # -- + # This implementation is based on Rack::QueryParser, + # Copyright (C) 2007-2021 Leah Neukirchen + # # pkg:gem/actionpack#lib/action_dispatch/http/param_builder.rb:9 def make_default(param_depth_limit); end end @@ -15557,8 +14665,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/http/param_error.rb:4 class ActionDispatch::ParamError < ::ActionDispatch::Http::Parameters::ParseError - # @return [ParamError] a new instance of ParamError - # # pkg:gem/actionpack#lib/action_dispatch/http/param_error.rb:5 def initialize(message = T.unsafe(nil)); end @@ -15600,10 +14706,6 @@ class ActionDispatch::ParamsTooDeepError < ::ActionDispatch::ParamError; end # # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:31 class ActionDispatch::PermissionsPolicy - # @return [PermissionsPolicy] a new instance of PermissionsPolicy - # @yield [_self] - # @yieldparam _self [ActionDispatch::PermissionsPolicy] the object that the method was called on - # # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:113 def initialize; end @@ -15622,8 +14724,6 @@ class ActionDispatch::PermissionsPolicy # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:123 def camera(*sources); end - # Returns the value of attribute directives. - # # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:111 def directives; end @@ -15713,8 +14813,6 @@ ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:32 class ActionDispatch::PermissionsPolicy::Middleware - # @return [Middleware] a new instance of Middleware - # # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:33 def initialize(app); end @@ -15723,13 +14821,9 @@ class ActionDispatch::PermissionsPolicy::Middleware private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:60 def policy_empty?(policy); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:56 def policy_present?(headers); end end @@ -15761,23 +14855,15 @@ ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String # # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:18 class ActionDispatch::PublicExceptions - # @return [PublicExceptions] a new instance of PublicExceptions - # # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:21 def initialize(public_path); end # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:25 def call(env); end - # Returns the value of attribute public_path. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:19 def public_path; end - # Sets the attribute public_path - # - # @param value the value to set the attribute public_path to. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:19 def public_path=(_arg0); end @@ -15876,8 +14962,6 @@ class ActionDispatch::RemoteIp # `custom_proxies` parameter. That way, the middleware will ignore those IP # addresses, and return the one that you want. # - # @return [RemoteIp] a new instance of RemoteIp - # # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:67 def initialize(app, ip_spoofing_check = T.unsafe(nil), custom_proxies = T.unsafe(nil)); end @@ -15889,13 +14973,9 @@ class ActionDispatch::RemoteIp # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:95 def call(env); end - # Returns the value of attribute check_ip. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:51 def check_ip; end - # Returns the value of attribute proxies. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:51 def proxies; end end @@ -15906,8 +14986,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:104 class ActionDispatch::RemoteIp::GetIp - # @return [GetIp] a new instance of GetIp - # # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:105 def initialize(req, check_ip, proxies); end @@ -15977,8 +15055,6 @@ class ActionDispatch::Request include ::ActionDispatch::RequestCookieMethods extend ::ActionDispatch::Http::Parameters::ClassMethods - # @return [Request] a new instance of Request - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:63 def initialize(env); end @@ -16068,8 +15144,6 @@ class ActionDispatch::Request # A request body is not assumed to contain form-data when no `Content-Type` # header is provided and the request_method is POST. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:378 def form_data?; end @@ -16118,15 +15192,11 @@ class ActionDispatch::Request # # request.key? :ip_spoofing_check # => true # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:114 def key?(key); end # True if the request came from localhost, 127.0.0.1, or ::1. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:473 def local?; end @@ -16189,13 +15259,9 @@ class ActionDispatch::Request # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:49 def pragma; end - # Override Rack's GET method to support indifferent access. - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:410 def query_parameters; end - # Returns the value of attribute rack_request. - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:76 def rack_request; end @@ -16261,8 +15327,6 @@ class ActionDispatch::Request # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:208 def request_method_symbol; end - # Override Rack's POST method to support indifferent access. - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:440 def request_parameters; end @@ -16329,15 +15393,6 @@ class ActionDispatch::Request # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:395 def session_options=(options); end - # Returns the unique request id, which is based on either the `X-Request-Id` - # header that can be generated by a firewall, load balancer, or web server, or - # by the RequestId middleware (which sets the `action_dispatch.request_id` - # environment variable). - # - # This unique ID is useful for tracing a request from end-to-end as part of - # logging or debugging. This relies on the Rack variable set by the - # ActionDispatch::RequestId middleware. - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:344 def uuid; end @@ -16356,12 +15411,6 @@ class ActionDispatch::Request # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:49 def x_request_id; end - # Returns true if the `X-Requested-With` header contains "XMLHttpRequest" - # (case-insensitive), which may need to be manually added depending on the - # choice of JavaScript libraries and frameworks. - # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:308 def xhr?; end @@ -16369,8 +15418,6 @@ class ActionDispatch::Request # (case-insensitive), which may need to be manually added depending on the # choice of JavaScript libraries and frameworks. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:305 def xml_http_request?; end @@ -16479,8 +15526,6 @@ ActionDispatch::Request::RFC5789 = T.let(T.unsafe(nil), Array) # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:10 class ActionDispatch::Request::Session - # @return [Session] a new instance of Session - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:76 def initialize(by, req, enabled: T.unsafe(nil)); end @@ -16517,18 +15562,12 @@ class ActionDispatch::Request::Session # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:245 def each(&block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:240 def empty?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:91 def enabled?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:230 def exists?; end @@ -16552,8 +15591,6 @@ class ActionDispatch::Request::Session # Returns true if the session has the given key or false. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:134 def has_key?(key); end @@ -16563,20 +15600,12 @@ class ActionDispatch::Request::Session # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:249 def id_was; end - # Returns true if the session has the given key or false. - # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:139 def include?(key); end # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:222 def inspect; end - # Returns true if the session has the given key or false. - # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:138 def key?(key); end @@ -16585,35 +15614,18 @@ class ActionDispatch::Request::Session # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:142 def keys; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:236 def loaded?; end - # Updates the session with given Hash. - # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} - # - # session.update({ "foo" => "bar" }) - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} - # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:191 def merge!(hash); end # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:95 def options; end - # Writes given value to given key of the session. - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:158 def store(key, value); end - # Returns the session as Hash. - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:171 def to_h; end @@ -16686,8 +15698,6 @@ ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:47 class ActionDispatch::Request::Session::Options - # @return [Options] a new instance of Options - # # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:56 def initialize(by, default_options); end @@ -16821,8 +15831,6 @@ module ActionDispatch::RequestCookieMethods # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:46 def encrypted_signed_cookie_salt; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:26 def have_cookie_jar?; end @@ -16847,24 +15855,18 @@ end # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:9 class ActionDispatch::RequestEncoder - # @return [RequestEncoder] a new instance of RequestEncoder - # # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:21 def initialize(mime_name, param_encoder, response_parser, content_type); end # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:34 def accept_header; end - # Returns the value of attribute content_type. - # # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:19 def content_type; end # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:38 def encode_params(params); end - # Returns the value of attribute response_parser. - # # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:19 def response_parser; end @@ -16913,8 +15915,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:24 class ActionDispatch::RequestId - # @return [RequestId] a new instance of RequestId - # # pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:25 def initialize(app, header:); end @@ -16965,10 +15965,6 @@ class ActionDispatch::Response include ::ActionDispatch::Http::Cache::Response include ::MonitorMixin - # @return [Response] a new instance of Response - # @yield [_self] - # @yieldparam _self [ActionDispatch::Response] the object that the method was called on - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:197 def initialize(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil)); end @@ -17035,8 +16031,6 @@ class ActionDispatch::Response # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:233 def commit!; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:257 def committed?; end @@ -17089,25 +16083,9 @@ class ActionDispatch::Response # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:219 def get_header(key); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:218 def has_header?(key); end - # The headers for the response. - # - # header["Content-Type"] # => "text/plain" - # header["Content-Type"] = "application/json" - # header["Content-Type"] # => "application/json" - # - # Also aliased as `headers`. - # - # headers["Content-Type"] # => "text/plain" - # headers["Content-Type"] = "application/json" - # headers["Content-Type"] # => "application/json" - # - # Also aliased as `header` for compatibility. - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:87 def header; end @@ -17144,11 +16122,6 @@ class ActionDispatch::Response # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:362 def message; end - # Turns the Response into a Rack-compatible array of the status, headers, and - # body. Allows explicit splatting: - # - # status, headers, body = *response - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:464 def prepare!; end @@ -17183,8 +16156,6 @@ class ActionDispatch::Response # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:241 def sending!; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:256 def sending?; end @@ -17194,8 +16165,6 @@ class ActionDispatch::Response # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:249 def sent!; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:258 def sent?; end @@ -17212,14 +16181,6 @@ class ActionDispatch::Response # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:273 def status=(status); end - # Returns the corresponding message for the current HTTP status code: - # - # response.status = 200 - # response.message # => "OK" - # - # response.status = 404 - # response.message # => "Not Found" - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:365 def status_message; end @@ -17297,13 +16258,9 @@ end # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:114 class ActionDispatch::Response::Buffer - # @return [Buffer] a new instance of Buffer - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:115 def initialize(response, buf); end - # @raise [IOError] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:155 def <<(string); end @@ -17316,24 +16273,18 @@ class ActionDispatch::Response::Buffer # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:170 def close; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:175 def closed?; end # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:157 def each(&block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:124 def respond_to?(method, include_private = T.unsafe(nil)); end # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:132 def to_ary; end - # @raise [IOError] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:148 def write(string); end @@ -17354,33 +16305,15 @@ ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:484 class ActionDispatch::Response::ContentTypeHeader < ::Struct - # Returns the value of attribute charset - # - # @return [Object] the current value of charset - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:484 def charset; end - # Sets the attribute charset - # - # @param value [Object] the value to set the attribute charset to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:484 def charset=(_); end - # Returns the value of attribute mime_type - # - # @return [Object] the current value of mime_type - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:484 def mime_type; end - # Sets the attribute mime_type - # - # @param value [Object] the value to set the attribute mime_type to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:484 def mime_type=(_); end @@ -17408,8 +16341,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:402 class ActionDispatch::Response::FileBody - # @return [FileBody] a new instance of FileBody - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:405 def initialize(path); end @@ -17441,8 +16372,6 @@ ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDis # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:543 class ActionDispatch::Response::RackBody - # @return [RackBody] a new instance of RackBody - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:544 def initialize(response); end @@ -17458,13 +16387,9 @@ class ActionDispatch::Response::RackBody # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:574 def each(*args, &block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:562 def respond_to?(method, include_private = T.unsafe(nil)); end - # Returns the value of attribute response. - # # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:548 def response; end @@ -17734,8 +16659,6 @@ module ActionDispatch::Routing::ConsoleFormatter; end # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:159 class ActionDispatch::Routing::ConsoleFormatter::Base - # @return [Base] a new instance of Base - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:160 def initialize; end @@ -17760,8 +16683,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:244 class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base - # @return [Expanded] a new instance of Expanded - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:245 def initialize(width: T.unsafe(nil)); end @@ -17823,26 +16744,18 @@ class ActionDispatch::Routing::Endpoint # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:11 def app; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:8 def dispatcher?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:14 def engine?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:10 def matches?(req); end # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:12 def rack_app; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:9 def redirect?; end end @@ -17852,8 +16765,6 @@ ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:305 class ActionDispatch::Routing::HtmlTableFormatter - # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:306 def initialize(view); end @@ -17888,8 +16799,6 @@ class ActionDispatch::Routing::Mapper include ::ActionDispatch::Routing::Mapper::Resources include ::ActionDispatch::Routing::Mapper::CustomUrls - # @return [Mapper] a new instance of Mapper - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2530 def initialize(set); end @@ -17920,8 +16829,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:15 class ActionDispatch::Routing::Mapper::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner - # @return [BacktraceCleaner] a new instance of BacktraceCleaner - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:16 def initialize; end end @@ -17936,8 +16843,6 @@ module ActionDispatch::Routing::Mapper::Base # Query if the following named route was already defined. # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:662 def has_named_route?(name); end @@ -18122,8 +17027,6 @@ module ActionDispatch::Routing::Mapper::Base # This will generate the `exciting_path` and `exciting_url` helpers which can be # used to navigate to this mounted app. # - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:605 def mount(app = T.unsafe(nil), deprecated_options = T.unsafe(nil), as: T.unsafe(nil), via: T.unsafe(nil), at: T.unsafe(nil), defaults: T.unsafe(nil), constraints: T.unsafe(nil), anchor: T.unsafe(nil), format: T.unsafe(nil), path: T.unsafe(nil), internal: T.unsafe(nil), **mapping, &block); end @@ -18144,8 +17047,6 @@ module ActionDispatch::Routing::Mapper::Base # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:698 def define_generate_prefix(app, name); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:685 def rails_app?(app); end end @@ -18249,28 +17150,18 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:29 class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint - # @return [Constraints] a new instance of Constraints - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:35 def initialize(app, constraints, strategy); end - # Returns the value of attribute app. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:30 def app; end - # Returns the value of attribute constraints. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:30 def constraints; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:50 def dispatcher?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:52 def matches?(req); end @@ -18459,62 +17350,42 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:83 class ActionDispatch::Routing::Mapper::Mapping - # @return [Mapping] a new instance of Mapping - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:132 def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, internal:, options:); end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:190 def application; end - # Returns the value of attribute ast. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def ast; end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:194 def conditions; end - # Returns the value of attribute default_action. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def default_action; end - # Returns the value of attribute default_controller. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def default_controller; end - # Returns the value of attribute defaults. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def defaults; end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:183 def make_route(name, precedence); end - # Returns the value of attribute path. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def path; end - # Returns the value of attribute required_defaults. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def required_defaults; end - # Returns the value of attribute requirements. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def requirements; end - # Returns the value of attribute scope_options. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def scope_options; end - # Returns the value of attribute to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 def to; end @@ -18578,8 +17449,6 @@ class ActionDispatch::Routing::Mapper::Mapping # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:116 def normalize_path(path, format); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:128 def optional_format?(path, format); end end @@ -18681,8 +17550,6 @@ module ActionDispatch::Routing::Mapper::Resources # match 'path', to: 'controller#action', via: :post # match 'otherpath', on: :member, via: :get # - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1837 def match(*path_or_actions, as: T.unsafe(nil), via: T.unsafe(nil), to: T.unsafe(nil), controller: T.unsafe(nil), action: T.unsafe(nil), on: T.unsafe(nil), defaults: T.unsafe(nil), constraints: T.unsafe(nil), anchor: T.unsafe(nil), format: T.unsafe(nil), path: T.unsafe(nil), internal: T.unsafe(nil), **mapping, &block); end @@ -18904,28 +17771,20 @@ module ActionDispatch::Routing::Mapper::Resources # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1783 def shallow; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1790 def shallow?; end private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1968 def action_options?(options); end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2066 def action_path(name); end - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2195 def add_route(action, controller, as, options_action, _path, to, via, formatted, anchor, options_constraints, internal, options_mapping); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2120 def api_only?; end @@ -18938,8 +17797,6 @@ module ActionDispatch::Routing::Mapper::Resources # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1928 def apply_common_behavior_for(method, resources, shallow: T.unsafe(nil), **options, &block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2041 def canonical_action?(action); end @@ -18961,16 +17818,12 @@ module ActionDispatch::Routing::Mapper::Resources # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2018 def nested_options; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1999 def nested_scope?; end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2037 def param_constraint; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2033 def param_constraint?; end @@ -18986,16 +17839,12 @@ module ActionDispatch::Routing::Mapper::Resources # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2070 def prefix_name_for_action(as, action); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1995 def resource_method_scope?; end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2010 def resource_scope(resource, &block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1991 def resource_scope?; end @@ -19011,8 +17860,6 @@ module ActionDispatch::Routing::Mapper::Resources # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2045 def shallow_scope; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2176 def using_match_shorthand?(path); end @@ -19028,8 +17875,6 @@ ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(ni # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1306 class ActionDispatch::Routing::Mapper::Resources::Resource - # @return [Resource] a new instance of Resource - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1319 def initialize(entities, api_only, shallow, only: T.unsafe(nil), except: T.unsafe(nil), **options); end @@ -19045,13 +17890,9 @@ class ActionDispatch::Routing::Mapper::Resources::Resource # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1378 def collection_name; end - # Returns the value of attribute path. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1386 def collection_scope; end - # Returns the value of attribute controller. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1317 def controller; end @@ -19076,13 +17917,9 @@ class ActionDispatch::Routing::Mapper::Resources::Resource # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1394 def new_scope(new_path); end - # Returns the value of attribute param. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1317 def param; end - # Returns the value of attribute path. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1317 def path; end @@ -19092,16 +17929,12 @@ class ActionDispatch::Routing::Mapper::Resources::Resource # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1382 def resource_scope; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1406 def shallow?; end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1392 def shallow_scope; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1410 def singleton?; end @@ -19121,8 +17954,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1418 class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDispatch::Routing::Mapper::Resources::Resource - # @return [SingletonResource] a new instance of SingletonResource - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1429 def initialize(entities, api_only, shallow, **options); end @@ -19144,8 +17975,6 @@ class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDi # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1440 def plural; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1454 def singleton?; end @@ -19168,8 +17997,6 @@ ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(ni class ActionDispatch::Routing::Mapper::Scope include ::Enumerable - # @return [Scope] a new instance of Scope - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2450 def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end @@ -19185,8 +18012,6 @@ class ActionDispatch::Routing::Mapper::Scope # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2513 def frame; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2456 def nested?; end @@ -19196,41 +18021,27 @@ class ActionDispatch::Routing::Mapper::Scope # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2505 def new_level(level); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2460 def null?; end # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2497 def options; end - # Returns the value of attribute parent. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2448 def parent; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2472 def resource_method_scope?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2493 def resource_scope?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2468 def resources?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2464 def root?; end - # Returns the value of attribute scope_level. - # # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2448 def scope_level; end end @@ -19540,8 +18351,6 @@ class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirec private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:111 def interpolation_required?(string, params); end end @@ -19687,8 +18496,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:185 class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder - # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder - # # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:248 def initialize(key_strategy, prefix, suffix); end @@ -19713,13 +18520,9 @@ class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:258 def handle_string_call(target, str); end - # Returns the value of attribute prefix. - # # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:246 def prefix; end - # Returns the value of attribute suffix. - # # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:246 def suffix; end @@ -19763,13 +18566,9 @@ ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:12 class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint - # @return [Redirect] a new instance of Redirect - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:15 def initialize(status, block, source_location); end - # Returns the value of attribute block. - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:13 def block; end @@ -19785,13 +18584,9 @@ class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:65 def path(params, request); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:21 def redirect?; end - # Returns the value of attribute status. - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:13 def status; end @@ -19806,8 +18601,6 @@ class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:86 def escape_path(params); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:74 def relative_path?(path); end end @@ -19869,8 +18662,6 @@ module ActionDispatch::Routing::Redirection # # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) # - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:206 def redirect(*args, &block); end end @@ -19880,24 +18671,18 @@ end # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:17 class ActionDispatch::Routing::RouteSet - # @return [RouteSet] a new instance of RouteSet - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:386 def initialize(config = T.unsafe(nil)); end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:674 def add_polymorphic_mapping(klass, options, &block); end - # @raise [ArgumentError] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:643 def add_route(mapping, name); end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:678 def add_url_helper(name, options, &block); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:417 def api_only?; end @@ -19919,58 +18704,36 @@ class ActionDispatch::Routing::RouteSet # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:425 def default_scope=(new_default_scope); end - # Returns the value of attribute default_url_options. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 def default_url_options; end - # Sets the attribute default_url_options - # - # @param value the value to set the attribute default_url_options to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 def default_url_options=(_arg0); end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:509 def define_mounted_helper(name, script_namer = T.unsafe(nil)); end - # Returns the value of attribute disable_clear_and_finalize. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:353 def disable_clear_and_finalize; end - # Sets the attribute disable_clear_and_finalize - # - # @param value the value to set the attribute disable_clear_and_finalize to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:353 def disable_clear_and_finalize=(_arg0); end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:457 def draw(&block); end - # Returns the value of attribute draw_paths. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 def draw_paths; end - # Sets the attribute draw_paths - # - # @param value the value to set the attribute draw_paths to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 def draw_paths=(_arg0); end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:406 def eager_load!; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:639 def empty?; end - # Returns the value of attribute env_key. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:355 def env_key; end @@ -19986,15 +18749,9 @@ class ActionDispatch::Routing::RouteSet # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:846 def find_script_name(options); end - # Returns the value of attribute formatter. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def formatter; end - # Sets the attribute formatter - # - # @param value the value to set the attribute formatter to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def formatter=(_arg0); end @@ -20033,28 +18790,18 @@ class ActionDispatch::Routing::RouteSet # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:505 def mounted_helpers; end - # Returns the value of attribute named_routes. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def named_routes; end - # Sets the attribute named_routes - # - # @param value the value to set the attribute named_routes to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def named_routes=(_arg0); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:842 def optimize_routes_generation?; end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:850 def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end - # Returns the value of attribute polymorphic_mappings. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:355 def polymorphic_mappings; end @@ -20073,44 +18820,24 @@ class ActionDispatch::Routing::RouteSet # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:429 def request_class; end - # Returns the value of attribute resources_path_names. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:353 def resources_path_names; end - # Sets the attribute resources_path_names - # - # @param value the value to set the attribute resources_path_names to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:353 def resources_path_names=(_arg0); end - # Returns the value of attribute router. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def router; end - # Sets the attribute router - # - # @param value the value to set the attribute router to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def router=(_arg0); end - # Returns the value of attribute set. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:357 def routes; end - # Returns the value of attribute set. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def set; end - # Sets the attribute set - # - # @param value the value to set the attribute set to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 def set=(_arg0); end @@ -20144,48 +18871,21 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 class ActionDispatch::Routing::RouteSet::Config < ::Struct - # Returns the value of attribute api_only - # - # @return [Object] the current value of api_only - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 def api_only; end - # Sets the attribute api_only - # - # @param value [Object] the value to set the attribute api_only to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 def api_only=(_); end - # Returns the value of attribute default_scope - # - # @return [Object] the current value of default_scope - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 def default_scope; end - # Sets the attribute default_scope - # - # @param value [Object] the value to set the attribute default_scope to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 def default_scope=(_); end - # Returns the value of attribute relative_url_root - # - # @return [Object] the current value of relative_url_root - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 def relative_url_root; end - # Sets the attribute relative_url_root - # - # @param value [Object] the value to set the attribute relative_url_root to. - # @return [Object] the newly set value - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 def relative_url_root=(_); end @@ -20209,26 +18909,18 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:682 class ActionDispatch::Routing::RouteSet::CustomUrlHelper - # @return [CustomUrlHelper] a new instance of CustomUrlHelper - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:685 def initialize(name, defaults, &block); end - # Returns the value of attribute block. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:683 def block; end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:691 def call(t, args, only_path = T.unsafe(nil)); end - # Returns the value of attribute defaults. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:683 def defaults; end - # Returns the value of attribute name. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:683 def name; end @@ -20246,13 +18938,9 @@ ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionD # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:39 class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint - # @return [Dispatcher] a new instance of Dispatcher - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:40 def initialize(raise_on_name_error); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:44 def dispatcher?; end @@ -20270,8 +18958,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:712 class ActionDispatch::Routing::RouteSet::Generator - # @return [Generator] a new instance of Generator - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:715 def initialize(named_route, options, recall, set); end @@ -20281,8 +18967,6 @@ class ActionDispatch::Routing::RouteSet::Generator # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:731 def current_controller; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:801 def different_controller?; end @@ -20292,8 +18976,6 @@ class ActionDispatch::Routing::RouteSet::Generator # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:797 def generate; end - # Returns the value of attribute named_route. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:713 def named_route; end @@ -20313,18 +18995,12 @@ class ActionDispatch::Routing::RouteSet::Generator # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:743 def normalize_options!; end - # Returns the value of attribute options. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:713 def options; end - # Returns the value of attribute recall. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:713 def recall; end - # Returns the value of attribute set. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:713 def set; end @@ -20339,8 +19015,6 @@ class ActionDispatch::Routing::RouteSet::Generator private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:807 def named_route_exists?; end @@ -20377,8 +19051,6 @@ end class ActionDispatch::Routing::RouteSet::NamedRouteCollection include ::Enumerable - # @return [NamedRouteCollection] a new instance of NamedRouteCollection - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:87 def initialize; end @@ -20412,8 +19084,6 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:100 def helper_names; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:141 def key?(name); end @@ -20423,18 +19093,12 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:155 def names; end - # Returns the value of attribute path_helpers_module. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:84 def path_helpers_module; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:95 def route_defined?(name); end - # Returns the value of attribute url_helpers_module. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:84 def url_helpers_module; end @@ -20456,16 +19120,12 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:333 def define_url_helper(mod, name, helper, url_strategy); end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:84 def routes; end end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:188 class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper - # @return [UrlHelper] a new instance of UrlHelper - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:271 def initialize(route, options, route_name); end @@ -20475,8 +19135,6 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:290 def handle_positional_args(controller_options, inner_options, args, result, path_params); end - # Returns the value of attribute route_name. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:201 def route_name; end @@ -20484,8 +19142,6 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:189 def create(route, options, route_name); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:197 def optimize_helper?(route); end end @@ -20493,13 +19149,9 @@ end # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:203 class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper - # @return [OptimizedUrlHelper] a new instance of OptimizedUrlHelper - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:206 def initialize(route, options, route_name); end - # Returns the value of attribute arg_size. - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:204 def arg_size; end @@ -20508,8 +19160,6 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::Optimi private - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:243 def optimize_routes_generation?(t); end @@ -20519,8 +19169,6 @@ class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::Optimi # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:247 def parameterize_args(args); end - # @raise [ActionController::UrlGenerationError] - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:258 def raise_generation_error(args); end end @@ -20535,8 +19183,6 @@ ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:69 class ActionDispatch::Routing::RouteSet::StaticDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher - # @return [StaticDispatcher] a new instance of StaticDispatcher - # # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:70 def initialize(controller_class); end @@ -20563,18 +19209,12 @@ class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:17 def endpoint; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:64 def engine?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:60 def internal?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:11 def matches_filter?(filter, value); end @@ -20600,8 +19240,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:81 class ActionDispatch::Routing::RoutesInspector - # @return [RoutesInspector] a new instance of RoutesInspector - # # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:82 def initialize(routes); end @@ -20631,13 +19269,9 @@ class ActionDispatch::Routing::RoutesProxy include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionDispatch::Routing::UrlFor - # @return [RoutesProxy] a new instance of RoutesProxy - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:15 def initialize(routes, scope, helpers, script_namer = T.unsafe(nil)); end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:13 def _routes; end @@ -20650,27 +19284,15 @@ class ActionDispatch::Routing::RoutesProxy # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 def default_url_options?; end - # Returns the value of attribute routes. - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 def routes; end - # Sets the attribute routes - # - # @param value the value to set the attribute routes to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 def routes=(_arg0); end - # Returns the value of attribute scope. - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 def scope; end - # Sets the attribute scope - # - # @param value the value to set the attribute scope to. - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 def scope=(_arg0); end @@ -20690,8 +19312,6 @@ class ActionDispatch::Routing::RoutesProxy # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:32 def method_missing(method, *args); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:28 def respond_to_missing?(method, _); end @@ -20906,8 +19526,6 @@ module ActionDispatch::Routing::UrlFor protected - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:227 def optimize_routes_generation?; end @@ -20994,8 +19612,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:66 class ActionDispatch::SSL - # @return [SSL] a new instance of SSL - # # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:76 def initialize(app, redirect: T.unsafe(nil), hsts: T.unsafe(nil), secure_cookies: T.unsafe(nil), ssl_default_redirect_status: T.unsafe(nil)); end @@ -21043,8 +19659,6 @@ ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), A # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:8 class ActionDispatch::ServerTiming - # @return [ServerTiming] a new instance of ServerTiming - # # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:52 def initialize(app); end @@ -21059,12 +19673,9 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:9 class ActionDispatch::ServerTiming::Subscriber - include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # @return [Subscriber] a new instance of Subscriber - # # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:13 def initialize; end @@ -21148,8 +19759,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:26 class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore - # @return [CacheStore] a new instance of CacheStore - # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:27 def initialize(app, options = T.unsafe(nil)); end @@ -21243,8 +19852,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:52 class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore - # @return [CookieStore] a new instance of CookieStore - # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:64 def initialize(app, options = T.unsafe(nil)); end @@ -21283,24 +19890,36 @@ ActionDispatch::Session::CookieStore::DEFAULT_SAME_SITE = T.let(T.unsafe(nil), P # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:53 class ActionDispatch::Session::CookieStore::SessionId - # @return [SessionId] a new instance of SessionId - # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:56 def initialize(session_id, cookie_value = T.unsafe(nil)); end - # Returns the value of attribute cookie_value. - # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:54 def cookie_value; end end +# # Action Dispatch Session MemCacheStore +# +# A session store that uses MemCache to implement storage. +# +# #### Options +# * `expire_after` - The length of time a session will be stored before +# automatically expiring. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/mem_cache_store.rb:23 +class ActionDispatch::Session::MemCacheStore < ::Rack::Session::Dalli + include ::ActionDispatch::Session::Compatibility + include ::ActionDispatch::Session::StaleSessionCheck + include ::ActionDispatch::Session::SessionObject + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/mem_cache_store.rb:28 + def initialize(app, options = T.unsafe(nil)); end +end + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:71 module ActionDispatch::Session::SessionObject # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:72 def commit_session(req, res); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:81 def loaded_session?(session); end @@ -21310,8 +19929,6 @@ end # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:13 class ActionDispatch::Session::SessionRestoreError < ::StandardError - # @return [SessionRestoreError] a new instance of SessionRestoreError - # # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:14 def initialize; end end @@ -21348,8 +19965,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:25 class ActionDispatch::ShowExceptions - # @return [ShowExceptions] a new instance of ShowExceptions - # # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:26 def initialize(app, exceptions_app); end @@ -21383,8 +19998,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:20 class ActionDispatch::Static - # @return [Static] a new instance of Static - # # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:21 def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end @@ -21417,8 +20030,6 @@ module ActionDispatch::TestHelpers::PageDumpHelper # pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:23 def open_file(path); end - # @raise [InvalidResponse] - # # pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:15 def save_page(path = T.unsafe(nil)); end end @@ -21430,8 +20041,6 @@ class ActionDispatch::TestHelpers::PageDumpHelper::InvalidResponse < ::StandardE module ActionDispatch::TestProcess include ::ActionDispatch::TestProcess::FixtureFile - # @raise [NoMethodError] - # # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:34 def assigns(key = T.unsafe(nil)); end @@ -21465,18 +20074,6 @@ module ActionDispatch::TestProcess::FixtureFile # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:22 def file_fixture_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end - # Shortcut for - # `Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type)`: - # - # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } - # - # Default fixture files location is `test/fixtures/files`. - # - # To upload binary files on Windows, pass `:binary` as the last parameter. This - # will not affect other platforms: - # - # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } - # # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:29 def fixture_file_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end end @@ -21637,8 +20234,6 @@ module Mime # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:56 def symbols; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:60 def valid_symbols?(symbols); end end @@ -21653,22 +20248,15 @@ Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:349 class Mime::AllType < ::Mime::Type - include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # @return [AllType] a new instance of AllType - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:352 def initialize; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:356 def all?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:357 def html?; end @@ -21693,8 +20281,6 @@ Mime::LOOKUP = T.let(T.unsafe(nil), Hash) class Mime::Mimes include ::Enumerable - # @return [Mimes] a new instance of Mimes - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:13 def initialize; end @@ -21707,27 +20293,18 @@ class Mime::Mimes # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:19 def each(&block); end - # Returns the value of attribute symbols. - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:9 def symbols; end - # :nodoc - # - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:41 def valid_symbols?(symbols); end end # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:365 class Mime::NullType - include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:368 def nil?; end @@ -21742,8 +20319,6 @@ class Mime::NullType # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:383 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:379 def respond_to_missing?(method, _); end @@ -21778,8 +20353,6 @@ Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:84 class Mime::Type - # @return [Type] a new instance of Type - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:264 def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end @@ -21792,36 +20365,24 @@ class Mime::Type # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:311 def =~(mime_type); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:327 def all?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:304 def eql?(other); end - # Returns the value of attribute hash. - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:255 def hash; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:323 def html?; end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:317 def match?(mime_type); end # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:285 def ref; end - # Returns the value of attribute symbol. - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:85 def symbol; end @@ -21836,13 +20397,9 @@ class Mime::Type protected - # Returns the value of attribute string. - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:330 def string; end - # Returns the value of attribute synonyms. - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:330 def synonyms; end @@ -21851,8 +20408,6 @@ class Mime::Type # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:336 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:344 def respond_to_missing?(method, include_private = T.unsafe(nil)); end @@ -21912,8 +20467,6 @@ end # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:90 class Mime::Type::AcceptItem - # @return [AcceptItem] a new instance of AcceptItem - # # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:94 def initialize(index, name, q = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/actiontext@8.1.2.rbi b/sorbet/rbi/gems/actiontext@8.1.2.rbi index 51928b708..6fa8321d9 100644 --- a/sorbet/rbi/gems/actiontext@8.1.2.rbi +++ b/sorbet/rbi/gems/actiontext@8.1.2.rbi @@ -7,6 +7,25 @@ # :markup: markdown # :include: ../README.md +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown # # pkg:gem/actiontext#lib/action_text/gem_version.rb:5 module ActionText @@ -86,8 +105,6 @@ module ActionText::Attachable # pkg:gem/actiontext#lib/action_text/attachable.rb:79 def attachable_sgid; end - # @return [Boolean] - # # pkg:gem/actiontext#lib/action_text/attachable.rb:99 def previewable_attachable?; end @@ -210,27 +227,15 @@ class ActionText::Attachables::ContentAttachment # pkg:gem/actiontext#lib/action_text/attachables/content_attachment.rb:20 def attachable_plain_text_representation(caption); end - # Returns the value of attribute content. - # # pkg:gem/actiontext#lib/action_text/attachables/content_attachment.rb:15 def content; end - # Sets the attribute content - # - # @param value the value to set the attribute content to. - # # pkg:gem/actiontext#lib/action_text/attachables/content_attachment.rb:15 def content=(_arg0); end - # Returns the value of attribute content_type. - # # pkg:gem/actiontext#lib/action_text/attachables/content_attachment.rb:15 def content_type; end - # Sets the attribute content_type - # - # @param value the value to set the attribute content_type to. - # # pkg:gem/actiontext#lib/action_text/attachables/content_attachment.rb:15 def content_type=(_arg0); end @@ -314,8 +319,6 @@ end class ActionText::Attachables::MissingAttachable extend ::ActiveModel::Naming - # @return [MissingAttachable] a new instance of MissingAttachable - # # pkg:gem/actiontext#lib/action_text/attachables/missing_attachable.rb:12 def initialize(sgid); end @@ -336,21 +339,15 @@ ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH = T.let(T.unsaf class ActionText::Attachables::RemoteImage extend ::ActiveModel::Naming - # @return [RemoteImage] a new instance of RemoteImage - # # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:32 def initialize(attributes = T.unsafe(nil)); end # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:39 def attachable_plain_text_representation(caption); end - # Returns the value of attribute content_type. - # # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:30 def content_type; end - # Returns the value of attribute height. - # # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:30 def height; end @@ -360,13 +357,9 @@ class ActionText::Attachables::RemoteImage # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:43 def to_partial_path; end - # Returns the value of attribute url. - # # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:30 def url; end - # Returns the value of attribute width. - # # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:30 def width; end @@ -379,8 +372,6 @@ class ActionText::Attachables::RemoteImage # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:22 def attributes_from_node(node); end - # @return [Boolean] - # # pkg:gem/actiontext#lib/action_text/attachables/remote_image.rb:18 def content_type_is_image?(content_type); end end @@ -406,13 +397,9 @@ class ActionText::Attachment extend ::ActionText::Attachments::Minification::ClassMethods extend ::ActionText::Attachments::TrixConversion::ClassMethods - # @return [Attachment] a new instance of Attachment - # # pkg:gem/actiontext#lib/action_text/attachment.rb:68 def initialize(node, attachable); end - # Returns the value of attribute attachable. - # # pkg:gem/actiontext#lib/action_text/attachment.rb:63 def attachable; end @@ -428,8 +415,6 @@ class ActionText::Attachment # pkg:gem/actiontext#lib/action_text/attachment.rb:66 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # Returns the value of attribute node. - # # pkg:gem/actiontext#lib/action_text/attachment.rb:63 def node; end @@ -555,8 +540,6 @@ class ActionText::AttachmentGallery extend ::ActiveModel::Validations::HelperMethods extend ::ActiveModel::Conversion::ClassMethods - # @return [AttachmentGallery] a new instance of AttachmentGallery - # # pkg:gem/actiontext#lib/action_text/attachment_gallery.rb:54 def initialize(node); end @@ -587,8 +570,6 @@ class ActionText::AttachmentGallery # pkg:gem/actiontext#lib/action_text/attachment_gallery.rb:7 def model_name(&_arg0); end - # Returns the value of attribute node. - # # pkg:gem/actiontext#lib/action_text/attachment_gallery.rb:52 def node; end @@ -771,8 +752,6 @@ class ActionText::Content extend ::ActionText::Serialization::ClassMethods extend ::ActionText::Rendering::ClassMethods - # @return [Content] a new instance of Content - # # pkg:gem/actiontext#lib/action_text/content.rb:40 def initialize(content = T.unsafe(nil), options = T.unsafe(nil)); end @@ -817,8 +796,6 @@ class ActionText::Content # pkg:gem/actiontext#lib/action_text/content.rb:30 def empty?(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute fragment. - # # pkg:gem/actiontext#lib/action_text/content.rb:27 def fragment; end @@ -987,8 +964,6 @@ module ActionText::Encryption # pkg:gem/actiontext#lib/action_text/encryption.rb:34 def encryptable_rich_texts; end - # @return [Boolean] - # # pkg:gem/actiontext#lib/action_text/encryption.rb:30 def has_encrypted_rich_texts?; end end @@ -1061,8 +1036,6 @@ end # pkg:gem/actiontext#lib/action_text/fragment.rb:6 class ActionText::Fragment - # @return [Fragment] a new instance of Fragment - # # pkg:gem/actiontext#lib/action_text/fragment.rb:28 def initialize(source); end @@ -1075,8 +1048,6 @@ class ActionText::Fragment # pkg:gem/actiontext#lib/action_text/fragment.rb:41 def replace(selector); end - # Returns the value of attribute source. - # # pkg:gem/actiontext#lib/action_text/fragment.rb:24 def source; end @@ -1089,8 +1060,6 @@ class ActionText::Fragment # pkg:gem/actiontext#lib/action_text/fragment.rb:58 def to_s; end - # @yield [source = self.source.dup] - # # pkg:gem/actiontext#lib/action_text/fragment.rb:36 def update; end @@ -1206,8 +1175,6 @@ end # pkg:gem/actiontext#lib/action_text/plain_text_conversion.rb:126 class ActionText::PlainTextConversion::BottomUpReducer - # @return [BottomUpReducer] a new instance of BottomUpReducer - # # pkg:gem/actiontext#lib/action_text/plain_text_conversion.rb:127 def initialize(node); end @@ -1352,16 +1319,12 @@ end # pkg:gem/actiontext#lib/action_text/trix_attachment.rb:6 class ActionText::TrixAttachment - # @return [TrixAttachment] a new instance of TrixAttachment - # # pkg:gem/actiontext#lib/action_text/trix_attachment.rb:53 def initialize(node); end # pkg:gem/actiontext#lib/action_text/trix_attachment.rb:57 def attributes; end - # Returns the value of attribute node. - # # pkg:gem/actiontext#lib/action_text/trix_attachment.rb:51 def node; end diff --git a/sorbet/rbi/gems/actionview@8.1.2.rbi b/sorbet/rbi/gems/actionview@8.1.2.rbi index 1dd838107..9eb71f384 100644 --- a/sorbet/rbi/gems/actionview@8.1.2.rbi +++ b/sorbet/rbi/gems/actionview@8.1.2.rbi @@ -15,6 +15,7 @@ class ActionController::Base < ::ActionController::Metal end # :include: ../README.rdoc +# :markup: markdown # # pkg:gem/actionview#lib/action_view/gem_version.rb:3 module ActionView @@ -63,8 +64,6 @@ end # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:21 class ActionView::AbstractRenderer - # @return [AbstractRenderer] a new instance of AbstractRenderer - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:24 def initialize(lookup_context); end @@ -74,8 +73,6 @@ class ActionView::AbstractRenderer # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:22 def formats(*_arg0, **_arg1, &_arg2); end - # @raise [NotImplementedError] - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:28 def render; end @@ -124,13 +121,9 @@ module ActionView::AbstractRenderer::ObjectRendering # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:76 def partial_path(object, view); end - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:61 def raise_invalid_identifier(path); end - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:65 def raise_invalid_option_as(as); end end @@ -146,8 +139,6 @@ ActionView::AbstractRenderer::ObjectRendering::PREFIXED_PARTIAL_NAMES = T.let(T. # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:110 class ActionView::AbstractRenderer::RenderedCollection - # @return [RenderedCollection] a new instance of RenderedCollection - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:117 def initialize(rendered_templates, spacer); end @@ -157,8 +148,6 @@ class ActionView::AbstractRenderer::RenderedCollection # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:126 def format; end - # Returns the value of attribute rendered_templates. - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:115 def rendered_templates; end @@ -170,37 +159,27 @@ end # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:130 class ActionView::AbstractRenderer::RenderedCollection::EmptyCollection - # @return [EmptyCollection] a new instance of EmptyCollection - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:133 def initialize(format); end # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:137 def body; end - # Returns the value of attribute format. - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:131 def format; end end # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:141 class ActionView::AbstractRenderer::RenderedTemplate - # @return [RenderedTemplate] a new instance of RenderedTemplate - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:144 def initialize(body, template); end - # Returns the value of attribute body. - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:142 def body; end # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:149 def format; end - # Returns the value of attribute template. - # # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:142 def template; end end @@ -399,8 +378,6 @@ class ActionView::Base # :startdoc: # - # @return [Base] a new instance of Base - # # pkg:gem/actionview#lib/action_view/base.rb:249 def initialize(lookup_context, assigns, controller); end @@ -437,8 +414,6 @@ class ActionView::Base # pkg:gem/actionview#lib/action_view/base.rb:177 def automatically_disable_submit_tag=(val); end - # @raise [NotImplementedError] - # # pkg:gem/actionview#lib/action_view/base.rb:287 def compiled_method_container; end @@ -490,8 +465,6 @@ class ActionView::Base # pkg:gem/actionview#lib/action_view/base.rb:183 def logger?; end - # Returns the value of attribute lookup_context. - # # pkg:gem/actionview#lib/action_view/base.rb:223 def lookup_context; end @@ -522,8 +495,6 @@ class ActionView::Base # pkg:gem/actionview#lib/action_view/base.rb:226 def view_paths=(arg); end - # Returns the value of attribute view_renderer. - # # pkg:gem/actionview#lib/action_view/base.rb:223 def view_renderer; end @@ -555,8 +526,6 @@ class ActionView::Base # pkg:gem/actionview#lib/action_view/base.rb:196 def cache_template_loading=(value); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/base.rb:218 def changed?(other); end @@ -631,8 +600,6 @@ class ActionView::Base # pkg:gem/actionview#lib/action_view/base.rb:239 def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/base.rb:200 def xss_safe?; end @@ -663,16 +630,12 @@ module ActionView::CacheExpiry; end # pkg:gem/actionview#lib/action_view/cache_expiry.rb:5 class ActionView::CacheExpiry::ViewReloader - # @return [ViewReloader] a new instance of ViewReloader - # # pkg:gem/actionview#lib/action_view/cache_expiry.rb:6 def initialize(watcher:, &block); end # pkg:gem/actionview#lib/action_view/cache_expiry.rb:21 def execute; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/cache_expiry.rb:16 def updated?; end @@ -703,8 +666,6 @@ module ActionView::CollectionCaching # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:20 def cache_collection_render(instrumentation_payload, view, template, collection); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:54 def callable_cache_key?; end @@ -733,8 +694,6 @@ module ActionView::CollectionCaching # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:91 def fetch_or_cache_partial(cached_partials, template, order_by:); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:16 def will_cache?(options, view); end end @@ -765,8 +724,6 @@ end class ActionView::CollectionRenderer::CollectionIterator include ::Enumerable - # @return [CollectionIterator] a new instance of CollectionIterator - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:39 def initialize(collection); end @@ -785,8 +742,6 @@ end # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:100 class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator - # @return [MixedCollectionIterator] a new instance of MixedCollectionIterator - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:101 def initialize(collection, paths); end @@ -796,8 +751,6 @@ end # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:78 class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator - # @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:79 def initialize(collection, path, variables, relation); end @@ -813,8 +766,6 @@ end # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:60 class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator - # @return [SameCollectionIterator] a new instance of SameCollectionIterator - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:61 def initialize(collection, path, variables); end @@ -850,27 +801,15 @@ module ActionView::Context # pkg:gem/actionview#lib/action_view/context.rb:18 def _prepare_context; end - # Returns the value of attribute output_buffer. - # # pkg:gem/actionview#lib/action_view/context.rb:15 def output_buffer; end - # Sets the attribute output_buffer - # - # @param value the value to set the attribute output_buffer to. - # # pkg:gem/actionview#lib/action_view/context.rb:15 def output_buffer=(_arg0); end - # Returns the value of attribute view_flow. - # # pkg:gem/actionview#lib/action_view/context.rb:15 def view_flow; end - # Sets the attribute view_flow - # - # @param value the value to set the attribute view_flow to. - # # pkg:gem/actionview#lib/action_view/context.rb:15 def view_flow=(_arg0); end end @@ -893,8 +832,6 @@ end # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:5 class ActionView::DependencyTracker::ERBTracker - # @return [ERBTracker] a new instance of ERBTracker - # # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:72 def initialize(name, template, view_paths = T.unsafe(nil)); end @@ -918,8 +855,6 @@ class ActionView::DependencyTracker::ERBTracker # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:158 def explicit_dependencies; end - # Returns the value of attribute name. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:80 def name; end @@ -929,8 +864,6 @@ class ActionView::DependencyTracker::ERBTracker # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:84 def source; end - # Returns the value of attribute template. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:80 def template; end @@ -938,8 +871,6 @@ class ActionView::DependencyTracker::ERBTracker # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:68 def call(name, template, view_paths = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:64 def supports_view_paths?; end end @@ -994,8 +925,6 @@ ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN = T.let(T.un # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:5 class ActionView::DependencyTracker::RubyTracker - # @return [RubyTracker] a new instance of RubyTracker - # # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:20 def initialize(name, template, view_paths = T.unsafe(nil), parser_class: T.unsafe(nil)); end @@ -1007,21 +936,15 @@ class ActionView::DependencyTracker::RubyTracker # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:38 def explicit_dependencies; end - # Returns the value of attribute name. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:26 def name; end # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:28 def render_dependencies; end - # Returns the value of attribute template. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:26 def template; end - # Returns the value of attribute view_paths. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:26 def view_paths; end @@ -1029,8 +952,6 @@ class ActionView::DependencyTracker::RubyTracker # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:8 def call(name, template, view_paths = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:16 def supports_view_paths?; end end @@ -1041,8 +962,6 @@ ActionView::DependencyTracker::RubyTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe # pkg:gem/actionview#lib/action_view/dependency_tracker/wildcard_resolver.rb:5 class ActionView::DependencyTracker::WildcardResolver - # @return [WildcardResolver] a new instance of WildcardResolver - # # pkg:gem/actionview#lib/action_view/dependency_tracker/wildcard_resolver.rb:6 def initialize(view_paths, dependencies); end @@ -1051,21 +970,15 @@ class ActionView::DependencyTracker::WildcardResolver private - # Returns the value of attribute explicit_dependencies. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/wildcard_resolver.rb:20 def explicit_dependencies; end # pkg:gem/actionview#lib/action_view/dependency_tracker/wildcard_resolver.rb:22 def resolved_wildcard_dependencies; end - # Returns the value of attribute view_paths. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/wildcard_resolver.rb:20 def view_paths; end - # Returns the value of attribute wildcard_dependencies. - # # pkg:gem/actionview#lib/action_view/dependency_tracker/wildcard_resolver.rb:20 def wildcard_dependencies; end end @@ -1112,13 +1025,9 @@ end # pkg:gem/actionview#lib/action_view/digestor.rb:78 class ActionView::Digestor::Node - # @return [Node] a new instance of Node - # # pkg:gem/actionview#lib/action_view/digestor.rb:86 def initialize(name, logical_name, template, children = T.unsafe(nil)); end - # Returns the value of attribute children. - # # pkg:gem/actionview#lib/action_view/digestor.rb:79 def children; end @@ -1128,18 +1037,12 @@ class ActionView::Digestor::Node # pkg:gem/actionview#lib/action_view/digestor.rb:93 def digest(finder, stack = T.unsafe(nil)); end - # Returns the value of attribute logical_name. - # # pkg:gem/actionview#lib/action_view/digestor.rb:79 def logical_name; end - # Returns the value of attribute name. - # # pkg:gem/actionview#lib/action_view/digestor.rb:79 def name; end - # Returns the value of attribute template. - # # pkg:gem/actionview#lib/action_view/digestor.rb:79 def template; end @@ -1176,14 +1079,9 @@ class ActionView::EncodingError < ::StandardError; end # # pkg:gem/actionview#lib/action_view/template/resolver.rb:90 class ActionView::FileSystemResolver < ::ActionView::Resolver - # @raise [ArgumentError] - # @return [FileSystemResolver] a new instance of FileSystemResolver - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:93 def initialize(path); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:115 def ==(resolver); end @@ -1196,13 +1094,9 @@ class ActionView::FileSystemResolver < ::ActionView::Resolver # pkg:gem/actionview#lib/action_view/template/resolver.rb:101 def clear_cache; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:112 def eql?(resolver); end - # Returns the value of attribute path. - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:91 def path; end @@ -1303,18 +1197,12 @@ module ActionView::Helpers::ActiveModelInstanceTag private - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:41 def object_has_errors?; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:45 def select_markup_helper?(type); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:49 def tag_generate_errors?(options); end end @@ -1794,8 +1682,6 @@ module ActionView::Helpers::AssetTagHelper # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:644 def extract_dimensions(size); end - # @yield [options] - # # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:617 def multiple_sources_tag_builder(type, sources); end @@ -2033,8 +1919,6 @@ module ActionView::Helpers::AssetUrlHelper # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" # - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:187 def asset_path(source, options = T.unsafe(nil)); end @@ -2169,169 +2053,27 @@ module ActionView::Helpers::AssetUrlHelper # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:333 def javascript_url(source, options = T.unsafe(nil)); end - # This is the entry point for all assets. - # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the - # behavior is "enhanced". You can bypass the asset pipeline by passing in - # skip_pipeline: true to the options. - # - # All other asset *_path helpers delegate through this method. - # - # === With the asset pipeline - # - # All options passed to +asset_path+ will be passed to +compute_asset_path+ - # which is implemented by asset pipeline gems. - # - # asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js" - # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js" - # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js" - # - # === Without the asset pipeline (skip_pipeline: true) - # - # Accepts a type option that can specify the asset's extension. No error - # checking is done to verify the source passed into +asset_path+ is valid - # and that the file exists on disk. - # - # asset_path("application.js", skip_pipeline: true) # => "application.js" - # asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png" - # asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js" - # asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css" - # - # === Options applying to all assets - # - # Below lists scenarios that apply to +asset_path+ whether or not you're - # using the asset pipeline. - # - # - All fully qualified URLs are returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js" - # - # - All assets that begin with a forward slash are assumed to be full - # URLs and will not be expanded. This will bypass the asset pipeline. - # - # asset_path("/foo.png") # => "/foo.png" - # - # - All blank strings will be returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("") # => "" - # - # - If config.relative_url_root is specified, all assets will have that - # root prepended. - # - # Rails.application.config.relative_url_root = "bar" - # asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js" - # - # - A different asset host can be specified via config.action_controller.asset_host - # this is commonly used in conjunction with a CDN. - # - # Rails.application.config.action_controller.asset_host = "assets.example.com" - # asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js" - # - # - An extension name can be specified manually with extname. - # - # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" - # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" - # aliased to avoid conflicts with an asset_path named route - # - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:219 def path_to_asset(source, options = T.unsafe(nil)); end - # Computes the path to an audio asset in the public audios directory. - # Full paths from the document root will be passed through. - # Used internally by +audio_tag+ to build the audio path. - # - # audio_path("horse") # => /audios/horse - # audio_path("horse.wav") # => /audios/horse.wav - # audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav - # audio_path("/sounds/horse.wav") # => /sounds/horse.wav - # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav - # aliased to avoid conflicts with an audio_path named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:433 def path_to_audio(source, options = T.unsafe(nil)); end - # Computes the path to a font asset. - # Full paths from the document root will be passed through. - # - # font_path("font") # => /fonts/font - # font_path("font.ttf") # => /fonts/font.ttf - # font_path("dir/font.ttf") # => /fonts/dir/font.ttf - # font_path("/dir/font.ttf") # => /dir/font.ttf - # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf - # aliased to avoid conflicts with a font_path named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:458 def path_to_font(source, options = T.unsafe(nil)); end - # Computes the path to an image asset. - # Full paths from the document root will be passed through. - # Used internally by +image_tag+ to build the image path: - # - # image_path("edit") # => "/assets/edit" - # image_path("edit.png") # => "/assets/edit.png" - # image_path("icons/edit.png") # => "/assets/icons/edit.png" - # image_path("/icons/edit.png") # => "/icons/edit.png" - # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" - # - # If you have images as application resources this method may conflict with their named routes. - # The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and - # plugin authors are encouraged to do so. - # aliased to avoid conflicts with an image_path named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:381 def path_to_image(source, options = T.unsafe(nil)); end - # Computes the path to a JavaScript asset in the public javascripts directory. - # If the +source+ filename has no extension, .js will be appended (except for explicit URIs) - # Full paths from the document root will be passed through. - # Used internally by +javascript_include_tag+ to build the script path. - # - # javascript_path "xmlhr" # => /assets/xmlhr.js - # javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js - # javascript_path "/dir/xmlhr" # => /dir/xmlhr.js - # javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr - # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js - # aliased to avoid conflicts with a javascript_path named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:324 def path_to_javascript(source, options = T.unsafe(nil)); end - # Computes the path to a stylesheet asset in the public stylesheets directory. - # If the +source+ filename has no extension, .css will be appended (except for explicit URIs). - # Full paths from the document root will be passed through. - # Used internally by +stylesheet_link_tag+ to build the stylesheet path. - # - # stylesheet_path "style" # => /assets/style.css - # stylesheet_path "dir/style.css" # => /assets/dir/style.css - # stylesheet_path "/dir/style.css" # => /dir/style.css - # stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style - # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css - # aliased to avoid conflicts with a stylesheet_path named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:351 def path_to_stylesheet(source, options = T.unsafe(nil)); end - # Computes the path to a video asset in the public videos directory. - # Full paths from the document root will be passed through. - # Used internally by +video_tag+ to build the video path. - # - # video_path("hd") # => /videos/hd - # video_path("hd.avi") # => /videos/hd.avi - # video_path("trailers/hd.avi") # => /videos/trailers/hd.avi - # video_path("/trailers/hd.avi") # => /trailers/hd.avi - # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi - # aliased to avoid conflicts with a video_path named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:407 def path_to_video(source, options = T.unsafe(nil)); end - # Computes asset path to public directory. Plugins and - # extensions can override this method to point to custom assets - # or generate digested paths or query strings. - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:270 def public_compute_asset_path(source, options = T.unsafe(nil)); end @@ -2359,83 +2101,24 @@ module ActionView::Helpers::AssetUrlHelper # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:360 def stylesheet_url(source, options = T.unsafe(nil)); end - # Computes the full URL to an asset in the public directory. This - # will use +asset_path+ internally, so most of their behaviors - # will be the same. If +:host+ options is set, it overwrites global - # +config.action_controller.asset_host+ setting. - # - # All other options provided are forwarded to +asset_path+ call. - # - # asset_url "application.js" # => http://example.com/assets/application.js - # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js - # aliased to avoid conflicts with an asset_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:234 def url_to_asset(source, options = T.unsafe(nil)); end - # Computes the full URL to an audio asset in the public audios directory. - # This will use +audio_path+ internally, so most of their behaviors will be the same. - # Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav - # aliased to avoid conflicts with an audio_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:445 def url_to_audio(source, options = T.unsafe(nil)); end - # Computes the full URL to a font asset. - # This will use +font_path+ internally, so most of their behaviors will be the same. - # Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf - # aliased to avoid conflicts with a font_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:470 def url_to_font(source, options = T.unsafe(nil)); end - # Computes the full URL to an image asset. - # This will use +image_path+ internally, so most of their behaviors will be the same. - # Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png - # aliased to avoid conflicts with an image_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:393 def url_to_image(source, options = T.unsafe(nil)); end - # Computes the full URL to a JavaScript asset in the public javascripts directory. - # This will use +javascript_path+ internally, so most of their behaviors will be the same. - # Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js - # aliased to avoid conflicts with a javascript_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:336 def url_to_javascript(source, options = T.unsafe(nil)); end - # Computes the full URL to a stylesheet asset in the public stylesheets directory. - # This will use +stylesheet_path+ internally, so most of their behaviors will be the same. - # Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css - # aliased to avoid conflicts with a stylesheet_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:363 def url_to_stylesheet(source, options = T.unsafe(nil)); end - # Computes the full URL to a video asset in the public videos directory. - # This will use +video_path+ internally, so most of their behaviors will be the same. - # Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi - # aliased to avoid conflicts with a video_url named route - # # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:419 def url_to_video(source, options = T.unsafe(nil)); end @@ -2463,6 +2146,8 @@ module ActionView::Helpers::AssetUrlHelper def video_url(source, options = T.unsafe(nil)); end end +# aliased to avoid conflicts with an asset_url named route +# # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:236 ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS = T.let(T.unsafe(nil), Hash) @@ -2574,8 +2259,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:127 class ActionView::Helpers::AtomFeedHelper::AtomBuilder - # @return [AtomBuilder] a new instance of AtomBuilder - # # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:130 def initialize(xml); end @@ -2592,8 +2275,6 @@ class ActionView::Helpers::AtomFeedHelper::AtomBuilder # in the Atom spec as potentially containing XHTML content and # if type: 'xhtml' is, in fact, specified. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:153 def xhtml_block?(method, arguments); end end @@ -2603,8 +2284,6 @@ ActionView::Helpers::AtomFeedHelper::AtomBuilder::XHTML_TAG_NAMES = T.let(T.unsa # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:161 class ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder < ::ActionView::Helpers::AtomFeedHelper::AtomBuilder - # @return [AtomFeedBuilder] a new instance of AtomFeedBuilder - # # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:162 def initialize(xml, view, feed_options = T.unsafe(nil)); end @@ -2839,8 +2518,6 @@ module ActionView::Helpers::CacheHelper # <% raise StandardError, "Caching private data!" if caching? %> # <% end %> # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:196 def caching?; end @@ -2861,8 +2538,6 @@ module ActionView::Helpers::CacheHelper # <%= project_name_with_time(project) %> # <% end %> # - # @raise [UncacheableFragmentError] - # # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:213 def uncacheable!; end @@ -2885,8 +2560,6 @@ end module ActionView::Helpers::CacheHelper::CachingRegistry extend ::ActionView::Helpers::CacheHelper::CachingRegistry - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:300 def caching?; end @@ -3066,8 +2739,6 @@ module ActionView::Helpers::CaptureHelper # # # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:215 def content_for?(name); end @@ -3220,8 +2891,6 @@ module ActionView::Helpers::ControllerHelper # pkg:gem/actionview#lib/action_view/helpers/controller_helper.rb:18 def request_forgery_protection_token(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/controller_helper.rb:40 def respond_to?(method_name, include_private = T.unsafe(nil)); end @@ -3257,21 +2926,7 @@ end # # pkg:gem/actionview#lib/action_view/helpers/csrf_helper.rb:6 module ActionView::Helpers::CsrfHelper - # Returns meta tags "csrf-param" and "csrf-token" with the name of the cross-site - # request forgery protection parameter and token, respectively. - # - # - # <%= csrf_meta_tags %> - # - # - # These are used to generate the dynamic forms that implement non-remote links with - # :method. - # - # You don't need to use these tags for regular forms as they generate their own hidden fields. - # - # For Ajax requests other than GETs, extract the "csrf-token" from the meta-tag and send as the - # +X-CSRF-Token+ HTTP header. - # For backwards compatibility. + # For backwards compatibility. # # pkg:gem/actionview#lib/action_view/helpers/csrf_helper.rb:32 def csrf_meta_tag; end @@ -3526,22 +3181,6 @@ module ActionView::Helpers::DateHelper # pkg:gem/actionview#lib/action_view/helpers/date_helper.rb:95 def distance_of_time_in_words(from_time, to_time = T.unsafe(nil), options = T.unsafe(nil)); end - # Like distance_of_time_in_words, but where to_time is fixed to Time.now. - # - # time_ago_in_words(3.minutes.from_now) # => 3 minutes - # time_ago_in_words(3.minutes.ago) # => 3 minutes - # time_ago_in_words(Time.now - 15.hours) # => about 15 hours - # time_ago_in_words(Time.now) # => less than a minute - # time_ago_in_words(Time.now, include_seconds: true) # => less than 5 seconds - # - # from_time = Time.now - 3.days - 14.minutes - 25.seconds - # time_ago_in_words(from_time) # => 3 days - # - # from_time = (3.days + 14.minutes + 25.seconds).ago - # time_ago_in_words(from_time) # => 3 days - # - # Note that you cannot pass a Numeric value to time_ago_in_words. - # # pkg:gem/actionview#lib/action_view/helpers/date_helper.rb:187 def distance_of_time_in_words_to_now(from_time, options = T.unsafe(nil)); end @@ -3963,8 +3602,6 @@ class ActionView::Helpers::DateTimeSelector include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - # @return [DateTimeSelector] a new instance of DateTimeSelector - # # pkg:gem/actionview#lib/action_view/helpers/date_helper.rb:751 def initialize(datetime, options = T.unsafe(nil), html_options = T.unsafe(nil)); end @@ -4316,8 +3953,6 @@ end class ActionView::Helpers::FormBuilder include ::ActionView::ModelNaming - # @return [FormBuilder] a new instance of FormBuilder - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1720 def initialize(object_name, object, template, options); end @@ -4378,72 +4013,6 @@ class ActionView::Helpers::FormBuilder # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2649 def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end - # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object - # assigned to the template (identified by +object+). This object must be an instance object (@object) and not a local object. - # It's intended that +method+ returns an integer and if that integer is above zero, then the checkbox is checked. - # Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1 - # while the default +unchecked_value+ is set to 0 which is convenient for boolean values. - # - # ==== Options - # - # * Any standard HTML attributes for the tag can be passed in, for example +:class+. - # * :checked - +true+ or +false+ forces the state of the checkbox to be checked or not. - # * :include_hidden - If set to false, the auxiliary hidden field described below will not be generated. - # - # ==== Gotcha - # - # The HTML specification says unchecked check boxes are not successful, and - # thus web browsers do not send them. Unfortunately this introduces a gotcha: - # if an +Invoice+ model has a +paid+ flag, and in the form that edits a paid - # invoice the user unchecks its check box, no +paid+ parameter is sent. So, - # any mass-assignment idiom like - # - # @invoice.update(params[:invoice]) - # - # wouldn't update the flag. - # - # To prevent this the helper generates an auxiliary hidden field before - # every check box. The hidden field has the same name and its - # attributes mimic an unchecked check box. - # - # This way, the client either sends only the hidden field (representing - # the check box is unchecked), or both fields. Since the HTML specification - # says key/value pairs have to be sent in the same order they appear in the - # form, and parameters extraction gets the last occurrence of any repeated - # key in the query string, that works for ordinary forms. - # - # Unfortunately that workaround does not work when the check box goes - # within an array-like parameter, as in - # - # <%= fields_for "project[invoice_attributes][]", invoice, index: nil do |form| %> - # <%= form.checkbox :paid %> - # ... - # <% end %> - # - # because parameter name repetition is precisely what \Rails seeks to distinguish - # the elements of the array. For each item with a checked check box you - # get an extra ghost item with only that attribute, assigned to "0". - # - # In that case it is preferable to either use FormTagHelper#checkbox_tag or to use - # hashes instead of arrays. - # - # ==== Examples - # - # # Let's say that @article.validated? is 1: - # checkbox("validated") - # # => - # # - # - # # Let's say that @puppy.gooddog is "no": - # checkbox("gooddog", {}, "yes", "no") - # # => - # # - # - # # Let's say that @eula.accepted is "no": - # checkbox("accepted", { class: 'eula_check' }, "yes", "no") - # # => - # # - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2476 def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end @@ -4516,15 +4085,6 @@ class ActionView::Helpers::FormBuilder # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2473 def checkbox(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - # Wraps ActionView::Helpers::FormOptionsHelper#collection_checkboxes for form builders: - # - # <%= form_with model: @post do |f| %> - # <%= f.collection_checkboxes :author_ids, Author.all, :id, :name_with_initial %> - # <%= f.submit %> - # <% end %> - # - # Please refer to the documentation of the base helper for details. - # # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:914 def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end @@ -4603,8 +4163,6 @@ class ActionView::Helpers::FormBuilder # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2024 def email_field(method, options = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2670 def emitted_hidden_id?; end @@ -5010,8 +4568,6 @@ class ActionView::Helpers::FormBuilder # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1757 def id; end - # Returns the value of attribute index. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1697 def index; end @@ -5090,55 +4646,33 @@ class ActionView::Helpers::FormBuilder # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2024 def month_field(method, options = T.unsafe(nil)); end - # Returns the value of attribute multipart. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1697 def multipart; end # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1700 def multipart=(multipart); end - # Returns the value of attribute multipart. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1698 def multipart?; end # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2024 def number_field(method, options = T.unsafe(nil)); end - # Returns the value of attribute object. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1695 def object; end - # Sets the attribute object - # - # @param value the value to set the attribute object to. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1695 def object=(_arg0); end - # Returns the value of attribute object_name. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1695 def object_name; end - # Sets the attribute object_name - # - # @param value the value to set the attribute object_name to. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1695 def object_name=(_arg0); end - # Returns the value of attribute options. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1695 def options; end - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1695 def options=(_arg0); end @@ -5292,8 +4826,6 @@ class ActionView::Helpers::FormBuilder # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2708 def fields_for_with_nested_attributes(association_name, association, options, block); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:2704 def nested_attributes_association?(association_name); end @@ -5442,71 +4974,6 @@ module ActionView::Helpers::FormHelper # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1590 def _object_for_form_builder(object); end - # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object - # assigned to the template (identified by +object+). This object must be an instance object (@object) and not a local object. - # It's intended that +method+ returns an integer and if that integer is above zero, then the checkbox is checked. - # Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1 - # while the default +unchecked_value+ is set to 0 which is convenient for boolean values. - # - # ==== Options - # - # * Any standard HTML attributes for the tag can be passed in, for example +:class+. - # * :checked - +true+ or +false+ forces the state of the checkbox to be checked or not. - # * :include_hidden - If set to false, the auxiliary hidden field described below will not be generated. - # - # ==== Gotcha - # - # The HTML specification says unchecked check boxes are not successful, and - # thus web browsers do not send them. Unfortunately this introduces a gotcha: - # if an +Invoice+ model has a +paid+ flag, and in the form that edits a paid - # invoice the user unchecks its check box, no +paid+ parameter is sent. So, - # any mass-assignment idiom like - # - # @invoice.update(params[:invoice]) - # - # wouldn't update the flag. - # - # To prevent this the helper generates an auxiliary hidden field before - # every check box. The hidden field has the same name and its - # attributes mimic an unchecked check box. - # - # This way, the client either sends only the hidden field (representing - # the check box is unchecked), or both fields. Since the HTML specification - # says key/value pairs have to be sent in the same order they appear in the - # form, and parameters extraction gets the last occurrence of any repeated - # key in the query string, that works for ordinary forms. - # - # Unfortunately that workaround does not work when the check box goes - # within an array-like parameter, as in - # - # <%= fields_for "project[invoice_attributes][]", invoice, index: nil do |form| %> - # <%= form.checkbox :paid %> - # ... - # <% end %> - # - # because parameter name repetition is precisely what \Rails seeks to distinguish - # the elements of the array. For each item with a checked check box you - # get an extra ghost item with only that attribute, assigned to "0". - # - # In that case it is preferable to either use FormTagHelper#checkbox_tag or to use - # hashes instead of arrays. - # - # ==== Examples - # - # # Let's say that @article.validated? is 1: - # checkbox("article", "validated") - # # => - # # - # - # # Let's say that @puppy.gooddog is "no": - # checkbox("puppy", "gooddog", {}, "yes", "no") - # # => - # # - # - # checkbox("eula", "accepted", { class: 'eula_check' }, "yes", "no") - # # => - # # - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1349 def check_box(object_name, method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end @@ -5650,38 +5117,6 @@ module ActionView::Helpers::FormHelper # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1514 def datetime_field(object_name, method, options = T.unsafe(nil)); end - # Returns a text_field of type "datetime-local". - # - # datetime_field("user", "born_on") - # # => - # - # The default value is generated by trying to call +strftime+ with "%Y-%m-%dT%T" - # on the object's value, which makes it behave as expected for instances - # of DateTime and ActiveSupport::TimeWithZone. - # - # @user.born_on = Date.new(1984, 1, 12) - # datetime_field("user", "born_on") - # # => - # - # You can create values for the "min" and "max" attributes by passing - # instances of Date or Time to the options hash. - # - # datetime_field("user", "born_on", min: Date.today) - # # => - # - # Alternatively, you can pass a String formatted as an ISO8601 datetime as - # the values for "min" and "max." - # - # datetime_field("user", "born_on", min: "2014-05-20T00:00:00") - # # => - # - # By default, provided datetimes will be formatted including seconds. You can render just the date, hour, - # and minute by passing include_seconds: false. - # - # @user.born_on = Time.current - # datetime_field("user", "born_on", include_seconds: false) - # # => - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1518 def datetime_local_field(object_name, method, options = T.unsafe(nil)); end @@ -6340,8 +5775,6 @@ module ActionView::Helpers::FormHelper # ... # <% end %> # - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:435 def form_for(record, options = T.unsafe(nil), &block); end @@ -6616,8 +6049,6 @@ module ActionView::Helpers::FormHelper # form_with(**options.merge(builder: LabellingFormBuilder), &block) # end # - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:755 def form_with(model: T.unsafe(nil), scope: T.unsafe(nil), url: T.unsafe(nil), format: T.unsafe(nil), **options, &block); end @@ -6767,10 +6198,6 @@ module ActionView::Helpers::FormHelper # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1196 def password_field(object_name, method, options = T.unsafe(nil)); end - # Returns a text_field of type "tel". - # - # telephone_field("user", "phone") - # # => # aliases telephone_field # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1413 @@ -6838,31 +6265,6 @@ module ActionView::Helpers::FormHelper # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1409 def telephone_field(object_name, method, options = T.unsafe(nil)); end - # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+) - # on an object assigned to the template (identified by +object+). Additional options on the input tag can be passed as a - # hash with +options+. - # - # ==== Examples - # textarea(:article, :body, cols: 20, rows: 40) - # # => - # - # textarea(:comment, :text, size: "20x30") - # # => - # - # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') - # # => - # - # textarea(:entry, :body, size: "20x20", disabled: 'disabled') - # # => - # # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1280 def text_area(object_name, method, options = T.unsafe(nil)); end @@ -7033,161 +6435,80 @@ end # # # -# Another common case is a select tag for a belongs_to-associated object. -# -# Example with @post.person_id => 2: -# -# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: "None" }) -# -# could become: -# -# -# -# * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string. -# -# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { prompt: "Select Person" }) -# -# could become: -# -# -# -# * :index - like the other form helpers, #select can accept an :index option to manually set the ID used in the resulting output. Unlike other helpers, #select expects this -# option to be in the +html_options+ parameter. -# -# select("album[]", :genre, %w[ rap rock country ], {}, { index: nil }) -# -# becomes: -# -# -# -# * :disabled - can be a single value or an array of values that will be disabled options in the final output. -# -# select(:post, :category, Post::CATEGORIES, { disabled: "restricted" }) -# -# could become: -# -# -# -# When used with the #collection_select helper, :disabled can also be a Proc that identifies those options that should be disabled. -# -# collection_select(:post, :category_id, Category.all, :id, :name, { disabled: -> (category) { category.archived? } }) -# -# If the categories "2008 stuff" and "Christmas" return true when the method archived? is called, this would return: -# -# -# pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:93 -module ActionView::Helpers::FormOptionsHelper - include ::ActionView::Helpers::SanitizeHelper - include ::ActionView::Helpers::CaptureHelper - include ::ActionView::Helpers::OutputSafetyHelper - include ::ActionView::Helpers::TagHelper - include ::ActionView::Helpers::TextHelper - extend ::ActionView::Helpers::SanitizeHelper::ClassMethods - - # Returns check box tags for the collection of existing return values of - # +method+ for +object+'s class. The value returned from calling +method+ - # on the instance +object+ will be selected. If calling +method+ returns - # +nil+, no selection is made. - # - # The :value_method and :text_method parameters are - # methods to be called on each member of +collection+. The return values - # are used as the +value+ attribute and contents of each check box tag, - # respectively. They can also be any object that responds to +call+, such - # as a +proc+, that will be called for each member of the +collection+ to - # retrieve the value/text. - # - # Example object structure for use with this method: - # class Post < ActiveRecord::Base - # has_and_belongs_to_many :authors - # end - # class Author < ActiveRecord::Base - # has_and_belongs_to_many :posts - # def name_with_initial - # "#{first_name.first}. #{last_name}" - # end - # end - # - # Sample usage (selecting the associated Author for an instance of Post, @post): - # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) - # - # If @post.author_ids is already [1], this would return: - # - # - # - # - # - # - # - # - # It is also possible to customize the way the elements will be shown by - # giving a block to the method: - # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| - # b.label { b.checkbox } - # end - # - # The argument passed to the block is a special kind of builder for this - # collection, which has the ability to generate the label and check box - # for the current item in the collection, with proper text and value. - # Using it, you can change the label and check box display order or even - # use the label as wrapper, as in the example above. - # - # The builder methods label and checkbox also accept - # extra HTML options: - # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| - # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } - # end - # - # There are also three special methods available: object, text and - # value, which are the current item being rendered, its text and value methods, - # respectively. You can use them like this: - # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| - # b.label(:"data-value" => b.value) { b.checkbox + b.text } - # end - # - # ==== Gotcha - # - # When no selection is made for a collection of checkboxes most - # web browsers will not send any value. - # - # For example, if we have a +User+ model with +category_ids+ field and we - # have the following code in our update action: - # - # @user.update(params[:user]) - # - # If no +category_ids+ are selected then we can safely assume this field - # will not be updated. - # - # This is possible thanks to a hidden field generated by the helper method - # for every collection of checkboxes. - # This hidden field is given the same field name as the checkboxes with a - # blank value. - # - # In the rare case you don't want this hidden field, you can pass the - # include_hidden: false option to the helper method. - # +# Another common case is a select tag for a belongs_to-associated object. +# +# Example with @post.person_id => 2: +# +# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: "None" }) +# +# could become: +# +# +# +# * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string. +# +# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { prompt: "Select Person" }) +# +# could become: +# +# +# +# * :index - like the other form helpers, #select can accept an :index option to manually set the ID used in the resulting output. Unlike other helpers, #select expects this +# option to be in the +html_options+ parameter. +# +# select("album[]", :genre, %w[ rap rock country ], {}, { index: nil }) +# +# becomes: +# +# +# +# * :disabled - can be a single value or an array of values that will be disabled options in the final output. +# +# select(:post, :category, Post::CATEGORIES, { disabled: "restricted" }) +# +# could become: +# +# +# +# When used with the #collection_select helper, :disabled can also be a Proc that identifies those options that should be disabled. +# +# collection_select(:post, :category_id, Category.all, :id, :name, { disabled: -> (category) { category.archived? } }) +# +# If the categories "2008 stuff" and "Christmas" return true when the method archived? is called, this would return: +# +# +# pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:93 +module ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::TextHelper + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:787 def collection_check_boxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end @@ -7824,8 +7145,6 @@ module ActionView::Helpers::FormOptionsHelper # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:798 def option_text_and_value(option); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:808 def option_value_selected?(value, selected); end @@ -7892,35 +7211,6 @@ module ActionView::Helpers::FormTagHelper # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:571 def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end - # :call-seq: - # checkbox_tag(name, options = {}) - # checkbox_tag(name, value, options = {}) - # checkbox_tag(name, value, checked, options = {}) - # - # Creates a check box form input tag. - # - # ==== Options - # * :value - The value of the input. Defaults to "1". - # * :checked - If set to true, the checkbox will be checked by default. - # * :disabled - If set to true, the user will not be able to use this input. - # * Any other key creates standard HTML options for the tag. - # - # ==== Examples - # checkbox_tag 'accept' - # # => - # - # checkbox_tag 'rock', 'rock music' - # # => - # - # checkbox_tag 'receive_email', 'yes', true - # # => - # - # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' - # # => - # - # checkbox_tag 'eula', 'accepted', false, disabled: true - # # => - # # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:469 def check_box_tag(name, *args); end @@ -8030,31 +7320,6 @@ module ActionView::Helpers::FormTagHelper # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:800 def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - # Creates a text field of type "datetime-local". - # - # ==== Options - # - # Supports the same options as #text_field_tag. Additionally, supports: - # - # * :min - The minimum acceptable value. - # * :max - The maximum acceptable value. - # * :step - The acceptable value granularity. - # * :include_seconds - Include seconds in the output timestamp format (true by default). - # - # ==== Examples - # - # datetime_field_tag 'name' - # # => - # - # datetime_field_tag 'datetime', '2014-01-01T01:01' - # # => - # - # datetime_field_tag 'datetime', nil, class: 'special_input' - # # => - # - # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true - # # => - # # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:804 def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end @@ -8151,27 +7416,6 @@ module ActionView::Helpers::FormTagHelper # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:643 def field_set_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end - # Creates a field set for grouping HTML form elements. - # - # legend will become the fieldset's title (optional as per W3C). - # options accept the same values as tag. - # - # ==== Examples - # <%= field_set_tag do %> - #

<%= text_field_tag 'name' %>

- # <% end %> - # # =>

- # - # <%= field_set_tag 'Your details' do %> - #

<%= text_field_tag 'name' %>

- # <% end %> - # # =>
Your details

- # - # <%= field_set_tag nil, class: 'format' do %> - #

<%= text_field_tag 'name' %>

- # <% end %> - # # =>

- # # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:650 def fieldset_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end @@ -8444,26 +7688,6 @@ module ActionView::Helpers::FormTagHelper # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:383 def password_field_tag(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end - # Creates a text field of type "tel". - # - # ==== Options - # - # Supports the same options as #text_field_tag. - # - # ==== Examples - # - # telephone_field_tag 'name' - # # => - # - # telephone_field_tag 'tel', '0123456789' - # # => - # - # telephone_field_tag 'tel', nil, class: 'special_input' - # # => - # - # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true - # # => - # # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:720 def phone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end @@ -8646,36 +7870,6 @@ module ActionView::Helpers::FormTagHelper # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:717 def telephone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. - # - # ==== Options - # * :size - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10"). - # * :rows - Specify the number of rows in the textarea - # * :cols - Specify the number of columns in the textarea - # * :disabled - If set to true, the user will not be able to use this input. - # * :escape - By default, the contents of the text input are HTML escaped. - # If you need unescaped contents, set this to false. - # * Any other key creates standard HTML attributes for the tag. - # - # ==== Examples - # textarea_tag 'post' - # # => - # - # textarea_tag 'bio', @user.bio - # # => - # - # textarea_tag 'body', nil, rows: 10, cols: 25 - # # => - # - # textarea_tag 'body', nil, size: "25x10" - # # => - # - # textarea_tag 'description', "Description goes here.", disabled: true - # # => - # - # textarea_tag 'comment', nil, class: 'comment_input' - # # => - # # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:428 def text_area_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end @@ -8899,13 +8093,6 @@ module ActionView::Helpers::JavaScriptHelper # pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:30 def escape_javascript(javascript); end - # Escapes carriage returns and single and double quotes for JavaScript segments. - # - # Also available through the alias j(). This is particularly helpful in JavaScript - # responses, like: - # - # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); - # # pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:40 def j(javascript); end @@ -9076,18 +8263,12 @@ module ActionView::Helpers::NumberHelper # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:139 def escape_unsafe_options(options); end - # @raise [InvalidNumberError] - # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:172 def parse_float(number, raise_error); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:168 def valid_float?(number); end - # @raise [InvalidNumberError] - # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:155 def wrap_with_output_safety_handling(number, raise_on_invalid, &block); end end @@ -9097,20 +8278,12 @@ end # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:20 class ActionView::Helpers::NumberHelper::InvalidNumberError < ::StandardError - # @return [InvalidNumberError] a new instance of InvalidNumberError - # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:22 def initialize(number); end - # Returns the value of attribute number. - # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:21 def number; end - # Sets the attribute number - # - # @param value the value to set the attribute number to. - # # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:21 def number=(_arg0); end end @@ -9516,9 +8689,12 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:181 def full_sanitizer; end - # Sets the attribute full_sanitizer + # Gets the Rails::HTML::FullSanitizer instance used by +strip_tags+. Replace with + # any object that responds to +sanitize+. # - # @param value the value to set the attribute full_sanitizer to. + # class Application < Rails::Application + # config.action_view.full_sanitizer = MySpecialSanitizer.new + # end # # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:161 def full_sanitizer=(_arg0); end @@ -9533,9 +8709,12 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:191 def link_sanitizer; end - # Sets the attribute link_sanitizer + # Gets the Rails::HTML::LinkSanitizer instance used by +strip_links+. + # Replace with any object that responds to +sanitize+. # - # @param value the value to set the attribute link_sanitizer to. + # class Application < Rails::Application + # config.action_view.link_sanitizer = MySpecialSanitizer.new + # end # # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:161 def link_sanitizer=(_arg0); end @@ -9550,9 +8729,12 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:201 def safe_list_sanitizer; end - # Sets the attribute safe_list_sanitizer + # Gets the Rails::HTML::SafeListSanitizer instance used by sanitize and +sanitize_css+. + # Replace with any object that responds to +sanitize+. # - # @param value the value to set the attribute safe_list_sanitizer to. + # class Application < Rails::Application + # config.action_view.safe_list_sanitizer = MySpecialSanitizer.new + # end # # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:161 def safe_list_sanitizer=(_arg0); end @@ -9594,18 +8776,6 @@ module ActionView::Helpers::TagHelper # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:555 def cdata_section(content); end - # Returns a string of tokens built from +args+. - # - # ==== Examples - # token_list("foo", "bar") - # # => "foo bar" - # token_list("foo", "foo bar") - # # => "foo bar" - # token_list({ foo: true, bar: false }) - # # => "foo" - # token_list(nil, false, 123, "", "foo", { bar: true }) - # # => "123 foo bar" - # # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:540 def class_names(*args); end @@ -9822,8 +8992,6 @@ module ActionView::Helpers::TagHelper # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:577 def build_tag_values(*args); end - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:572 def ensure_valid_html5_tag_name(name); end @@ -9834,8 +9002,6 @@ module ActionView::Helpers::TagHelper # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:595 def build_tag_values(*args); end - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:575 def ensure_valid_html5_tag_name(name); end end @@ -9858,8 +9024,6 @@ ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:46 class ActionView::Helpers::TagHelper::TagBuilder - # @return [TagBuilder] a new instance of TagBuilder - # # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:213 def initialize(view_context); end @@ -10273,8 +9437,6 @@ class ActionView::Helpers::TagHelper::TagBuilder # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:309 def prefix_tag_option(prefix, key, value, escape); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:317 def respond_to_missing?(*args); end @@ -10318,20 +9480,14 @@ class ActionView::Helpers::Tags::Base extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods - # @return [Base] a new instance of Base - # # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:11 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end - # Returns the value of attribute object. - # # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:9 def object; end # This is what child classes implement. # - # @raise [NotImplementedError] - # # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:31 def render; end @@ -10349,8 +9505,6 @@ class ActionView::Helpers::Tags::Base # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:95 def add_default_name_and_id_for_value(tag_value, options, field = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:134 def generate_ids?; end @@ -10381,8 +9535,6 @@ class ActionView::Helpers::Tags::Base # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:46 def value_before_type_cast; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:58 def value_came_from_user?; end end @@ -10391,8 +9543,6 @@ end class ActionView::Helpers::Tags::CheckBox < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Checkable - # @return [CheckBox] a new instance of CheckBox - # # pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:11 def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options); end @@ -10401,8 +9551,6 @@ class ActionView::Helpers::Tags::CheckBox < ::ActionView::Helpers::Tags::Base private - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:42 def checked?(value); end @@ -10412,8 +9560,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/checkable.rb:6 module ActionView::Helpers::Tags::Checkable - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/checkable.rb:7 def input_checked?(options); end end @@ -10478,26 +9624,18 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:7 class ActionView::Helpers::Tags::CollectionHelpers::Builder - # @return [Builder] a new instance of Builder - # # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:10 def initialize(template_object, object_name, method_name, object, sanitized_attribute_name, text, value, input_html_options); end # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:22 def label(label_html_options = T.unsafe(nil), &block); end - # Returns the value of attribute object. - # # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:8 def object; end - # Returns the value of attribute text. - # # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:8 def text; end - # Returns the value of attribute value. - # # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:8 def value; end end @@ -10527,8 +9665,6 @@ class ActionView::Helpers::Tags::CollectionSelect < ::ActionView::Helpers::Tags: include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper - # @return [CollectionSelect] a new instance of CollectionSelect - # # pkg:gem/actionview#lib/action_view/helpers/tags/collection_select.rb:10 def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end @@ -10559,8 +9695,6 @@ end class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer - # @return [DateSelect] a new instance of DateSelect - # # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:11 def initialize(object_name, method_name, template_object, options, html_options); end @@ -10594,8 +9728,6 @@ class ActionView::Helpers::Tags::DatetimeField < ::ActionView::Helpers::Tags::Te # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:17 def datetime_value(value); end - # @raise [NotImplementedError] - # # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:25 def format_datetime(value); end @@ -10605,8 +9737,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_local_field.rb:6 class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField - # @return [DatetimeLocalField] a new instance of DatetimeLocalField - # # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_local_field.rb:7 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end @@ -10643,8 +9773,6 @@ class ActionView::Helpers::Tags::GroupedCollectionSelect < ::ActionView::Helpers include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper - # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect - # # pkg:gem/actionview#lib/action_view/helpers/tags/grouped_collection_select.rb:10 def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options); end @@ -10660,8 +9788,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:6 class ActionView::Helpers::Tags::Label < ::ActionView::Helpers::Tags::Base - # @return [Label] a new instance of Label - # # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:34 def initialize(object_name, method_name, template_object, content_or_options = T.unsafe(nil), options = T.unsafe(nil)); end @@ -10676,13 +9802,9 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:7 class ActionView::Helpers::Tags::Label::LabelBuilder - # @return [LabelBuilder] a new instance of LabelBuilder - # # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:10 def initialize(template_object, object_name, method_name, object, tag_value); end - # Returns the value of attribute object. - # # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:8 def object; end @@ -10723,8 +9845,6 @@ end class ActionView::Helpers::Tags::RadioButton < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Checkable - # @return [RadioButton] a new instance of RadioButton - # # pkg:gem/actionview#lib/action_view/helpers/tags/radio_button.rb:11 def initialize(object_name, method_name, template_object, tag_value, options); end @@ -10733,8 +9853,6 @@ class ActionView::Helpers::Tags::RadioButton < ::ActionView::Helpers::Tags::Base private - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/radio_button.rb:26 def checked?(value); end end @@ -10753,8 +9871,6 @@ class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper - # @return [Select] a new instance of Select - # # pkg:gem/actionview#lib/action_view/helpers/tags/select.rb:10 def initialize(object_name, method_name, template_object, choices, options, html_options); end @@ -10768,8 +9884,6 @@ class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base # [nil, []] # { nil => [] } # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/select.rb:39 def grouped_choices?; end end @@ -10781,8 +9895,6 @@ module ActionView::Helpers::Tags::SelectRenderer # pkg:gem/actionview#lib/action_view/helpers/tags/select_renderer.rb:38 def add_options(option_tags, options, value = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/tags/select_renderer.rb:33 def placeholder_required?(html_options); end @@ -10821,8 +9933,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/time_field.rb:6 class ActionView::Helpers::Tags::TimeField < ::ActionView::Helpers::Tags::DatetimeField - # @return [TimeField] a new instance of TimeField - # # pkg:gem/actionview#lib/action_view/helpers/tags/time_field.rb:7 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end @@ -10840,8 +9950,6 @@ class ActionView::Helpers::Tags::TimeZoneSelect < ::ActionView::Helpers::Tags::B include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper - # @return [TimeZoneSelect] a new instance of TimeZoneSelect - # # pkg:gem/actionview#lib/action_view/helpers/tags/time_zone_select.rb:10 def initialize(object_name, method_name, template_object, priority_zones, options, html_options); end @@ -10851,8 +9959,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:6 class ActionView::Helpers::Tags::Translator - # @return [Translator] a new instance of Translator - # # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:7 def initialize(object, object_name, method_and_value, scope:); end @@ -10867,23 +9973,15 @@ class ActionView::Helpers::Tags::Translator # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:22 def i18n_default; end - # Returns the value of attribute method_and_value. - # # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def method_and_value; end - # Returns the value of attribute model. - # # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def model; end - # Returns the value of attribute object_name. - # # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def object_name; end - # Returns the value of attribute scope. - # # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def scope; end end @@ -10904,8 +10002,6 @@ class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Ba include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper - # @return [WeekdaySelect] a new instance of WeekdaySelect - # # pkg:gem/actionview#lib/action_view/helpers/tags/weekday_select.rb:10 def initialize(object_name, method_name, template_object, options, html_options); end @@ -11313,8 +10409,6 @@ end # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:489 class ActionView::Helpers::TextHelper::Cycle - # @return [Cycle] a new instance of Cycle - # # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:492 def initialize(first_value, *values); end @@ -11327,8 +10421,6 @@ class ActionView::Helpers::TextHelper::Cycle # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:505 def to_s; end - # Returns the value of attribute values. - # # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:490 def values; end @@ -11353,11 +10445,6 @@ module ActionView::Helpers::TranslationHelper include ::ActionView::Helpers::TagHelper extend ::ActiveSupport::Concern - # Delegates to I18n.localize with no additional functionality. - # - # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize - # for more information. - # # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:119 def l(object, **options); end @@ -11369,58 +10456,6 @@ module ActionView::Helpers::TranslationHelper # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:116 def localize(object, **options); end - # Delegates to I18n#translate but also performs three additional - # functions. - # - # First, it will ensure that any thrown +MissingTranslation+ messages will - # be rendered as inline spans that: - # - # * Have a translation-missing class applied - # * Contain the missing key as the value of the +title+ attribute - # * Have a titleized version of the last key segment as text - # - # For example, the value returned for the missing translation key - # "blog.post.title" will be: - # - # Title - # - # This allows for views to display rather reasonable strings while still - # giving developers a way to find missing translations. - # - # If you would prefer missing translations to raise an error, you can - # opt out of span-wrapping behavior globally by setting - # config.i18n.raise_on_missing_translations = true or - # individually by passing raise: true as an option to - # translate. - # - # Second, if the key starts with a period translate will scope - # the key by the current partial. Calling translate(".foo") from - # the people/index.html.erb template is equivalent to calling - # translate("people.index.foo"). This makes it less - # repetitive to translate many keys within the same partial and provides - # a convention to scope keys consistently. - # - # Third, the translation will be marked as html_safe if the key - # has the suffix "_html" or the last element of the key is "html". Calling - # translate("footer_html") or translate("footer.html") - # will return an HTML safe string that won't be escaped by other HTML - # helper methods. This naming convention helps to identify translations - # that include HTML tags so that you know what kind of output to expect - # when you call translate in a template and translators know which keys - # they can provide HTML values for. - # - # To access the translated text along with the fully resolved - # translation key, translate accepts a block: - # - # <%= translate(".relative_key") do |translation, resolved_key| %> - # <%= translation %> - # <% end %> - # - # This enables annotate translated text to be aware of the scope it was - # resolved against. - # # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:110 def t(key, **options); end @@ -11669,8 +10704,6 @@ module ActionView::Helpers::UrlHelper # # We can also pass in the symbol arguments instead of strings. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:559 def current_page?(options = T.unsafe(nil), check_parameters: T.unsafe(nil), method: T.unsafe(nil), **options_as_kwargs); end @@ -12042,16 +11075,12 @@ module ActionView::Helpers::UrlHelper # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:707 def convert_options_to_data_attributes(options, html_options); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:730 def link_to_remote_options?(options); end # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:747 def method_for_options(options); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:765 def method_not_get_method?(method); end @@ -12119,8 +11148,6 @@ ActionView::Helpers::UrlHelper::STRINGIFIED_COMMON_METHODS = T.let(T.unsafe(nil) # # pkg:gem/actionview#lib/action_view/rendering.rb:8 class ActionView::I18nProxy < ::I18n::Config - # @return [I18nProxy] a new instance of I18nProxy - # # pkg:gem/actionview#lib/action_view/rendering.rb:11 def initialize(original_config, lookup_context); end @@ -12364,15 +11391,11 @@ module ActionView::Layouts # for that action or set the action_has_layout attribute # to false before rendering. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/layouts.rb:372 def action_has_layout?; end private - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/layouts.rb:377 def _conditional_layout?; end @@ -12390,8 +11413,6 @@ module ActionView::Layouts # pkg:gem/actionview#lib/action_view/layouts.rb:415 def _default_layout(lookup_context, formats, keys, require_layout = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/layouts.rb:430 def _include_layout?(options); end @@ -12490,8 +11511,6 @@ module ActionView::Layouts::ClassMethods::LayoutConditions # ==== Returns # * Boolean - True if the action has a layout definition, false otherwise. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/layouts.rb:233 def _conditional_layout?; end end @@ -12500,8 +11519,6 @@ end class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber include ::ActionView::LogSubscriber::Utils - # @return [LogSubscriber] a new instance of LogSubscriber - # # pkg:gem/actionview#lib/action_view/log_subscriber.rb:9 def initialize; end @@ -12546,8 +11563,6 @@ class ActionView::LogSubscriber::Start # pkg:gem/actionview#lib/action_view/log_subscriber.rb:94 def finish(name, id, payload); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/log_subscriber.rb:97 def silenced?(_); end @@ -12586,8 +11601,6 @@ class ActionView::LookupContext include ::ActionView::LookupContext::DetailsCache include ::ActionView::LookupContext::ViewPaths - # @return [LookupContext] a new instance of LookupContext - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:232 def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end @@ -12686,15 +11699,9 @@ ActionView::LookupContext::Accessors::DEFAULT_PROCS = T.let(T.unsafe(nil), Hash) # # pkg:gem/actionview#lib/action_view/lookup_context.rb:98 module ActionView::LookupContext::DetailsCache - # Returns the value of attribute cache. - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:99 def cache; end - # Sets the attribute cache - # - # @param value the value to set the attribute cache to. - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:99 def cache=(_arg0); end @@ -12742,21 +11749,15 @@ end # # pkg:gem/actionview#lib/action_view/lookup_context.rb:125 module ActionView::LookupContext::ViewPaths - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:148 def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:153 def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end # pkg:gem/actionview#lib/action_view/lookup_context.rb:155 def append_view_paths(paths); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:141 def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end @@ -12769,21 +11770,15 @@ module ActionView::LookupContext::ViewPaths # pkg:gem/actionview#lib/action_view/lookup_context.rb:133 def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end - # Returns the value of attribute html_fallback_for_js. - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:126 def html_fallback_for_js; end # pkg:gem/actionview#lib/action_view/lookup_context.rb:159 def prepend_view_paths(paths); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:146 def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end - # Returns the value of attribute view_paths. - # # pkg:gem/actionview#lib/action_view/lookup_context.rb:126 def view_paths; end @@ -12813,8 +11808,6 @@ end class ActionView::MissingTemplate < ::ActionView::ActionViewError include ::DidYouMean::Correctable - # @return [MissingTemplate] a new instance of MissingTemplate - # # pkg:gem/actionview#lib/action_view/template/error.rb:44 def initialize(paths, path, prefixes, partial, details, *_arg5); end @@ -12826,39 +11819,27 @@ class ActionView::MissingTemplate < ::ActionView::ActionViewError # pkg:gem/actionview#lib/action_view/template/error.rb:104 def corrections; end - # Returns the value of attribute partial. - # # pkg:gem/actionview#lib/action_view/template/error.rb:42 def partial; end - # Returns the value of attribute path. - # # pkg:gem/actionview#lib/action_view/template/error.rb:42 def path; end - # Returns the value of attribute paths. - # # pkg:gem/actionview#lib/action_view/template/error.rb:42 def paths; end - # Returns the value of attribute prefixes. - # # pkg:gem/actionview#lib/action_view/template/error.rb:42 def prefixes; end end # pkg:gem/actionview#lib/action_view/template/error.rb:71 class ActionView::MissingTemplate::Results - # @return [Results] a new instance of Results - # # pkg:gem/actionview#lib/action_view/template/error.rb:74 def initialize(size); end # pkg:gem/actionview#lib/action_view/template/error.rb:91 def add(path, score); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/error.rb:83 def should_record?(score); end @@ -12868,33 +11849,15 @@ end # pkg:gem/actionview#lib/action_view/template/error.rb:72 class ActionView::MissingTemplate::Results::Result < ::Struct - # Returns the value of attribute path - # - # @return [Object] the current value of path - # # pkg:gem/actionview#lib/action_view/template/error.rb:72 def path; end - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value - # # pkg:gem/actionview#lib/action_view/template/error.rb:72 def path=(_); end - # Returns the value of attribute score - # - # @return [Object] the current value of score - # # pkg:gem/actionview#lib/action_view/template/error.rb:72 def score; end - # Sets the attribute score - # - # @param value [Object] the value to set the attribute score to. - # @return [Object] the newly set value - # # pkg:gem/actionview#lib/action_view/template/error.rb:72 def score=(_); end @@ -12931,8 +11894,6 @@ end class ActionView::ObjectRenderer < ::ActionView::PartialRenderer include ::ActionView::AbstractRenderer::ObjectRendering - # @return [ObjectRenderer] a new instance of ObjectRenderer - # # pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:7 def initialize(lookup_context, options); end @@ -12968,8 +11929,6 @@ end # # pkg:gem/actionview#lib/action_view/buffers.rb:21 class ActionView::OutputBuffer - # @return [OutputBuffer] a new instance of OutputBuffer - # # pkg:gem/actionview#lib/action_view/buffers.rb:22 def initialize(buffer = T.unsafe(nil)); end @@ -13006,8 +11965,6 @@ class ActionView::OutputBuffer # pkg:gem/actionview#lib/action_view/buffers.rb:32 def html_safe; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/buffers.rb:38 def html_safe?; end @@ -13017,8 +11974,6 @@ class ActionView::OutputBuffer # pkg:gem/actionview#lib/action_view/buffers.rb:85 def raw; end - # Returns the value of attribute raw_buffer. - # # pkg:gem/actionview#lib/action_view/buffers.rb:89 def raw_buffer; end @@ -13045,8 +12000,6 @@ end # pkg:gem/actionview#lib/action_view/flows.rb:6 class ActionView::OutputFlow - # @return [OutputFlow] a new instance of OutputFlow - # # pkg:gem/actionview#lib/action_view/flows.rb:9 def initialize; end @@ -13055,13 +12008,9 @@ class ActionView::OutputFlow # pkg:gem/actionview#lib/action_view/flows.rb:24 def append(key, value); end - # Called by content_for - # # pkg:gem/actionview#lib/action_view/flows.rb:27 def append!(key, value); end - # Returns the value of attribute content. - # # pkg:gem/actionview#lib/action_view/flows.rb:7 def content; end @@ -13078,15 +12027,11 @@ end # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:6 class ActionView::PartialIteration - # @return [PartialIteration] a new instance of PartialIteration - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:13 def initialize(size); end # Check if this is the first iteration of the partial. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:19 def first?; end @@ -13100,8 +12045,6 @@ class ActionView::PartialIteration # Check if this is the last iteration of the partial. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:24 def last?; end @@ -13346,8 +12289,6 @@ end class ActionView::PartialRenderer < ::ActionView::AbstractRenderer include ::ActionView::CollectionCaching - # @return [PartialRenderer] a new instance of PartialRenderer - # # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:239 def initialize(lookup_context, options); end @@ -13392,8 +12333,6 @@ module ActionView::PathRegistry # pkg:gem/actionview#lib/action_view/path_registry.rb:22 def cast_file_system_resolvers(paths); end - # Returns the value of attribute file_system_resolver_hooks. - # # pkg:gem/actionview#lib/action_view/path_registry.rb:11 def file_system_resolver_hooks; end @@ -13417,8 +12356,6 @@ end class ActionView::PathSet include ::Enumerable - # @return [PathSet] a new instance of PathSet - # # pkg:gem/actionview#lib/action_view/path_set.rb:18 def initialize(paths = T.unsafe(nil)); end @@ -13434,8 +12371,6 @@ class ActionView::PathSet # pkg:gem/actionview#lib/action_view/path_set.rb:16 def each(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/path_set.rb:53 def exists?(path, prefixes, partial, details, details_key, locals); end @@ -13448,8 +12383,6 @@ class ActionView::PathSet # pkg:gem/actionview#lib/action_view/path_set.rb:16 def include?(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute paths. - # # pkg:gem/actionview#lib/action_view/path_set.rb:14 def paths; end @@ -13478,8 +12411,6 @@ class ActionView::Railtie < ::Rails::Engine; end # pkg:gem/actionview#lib/action_view/buffers.rb:92 class ActionView::RawOutputBuffer - # @return [RawOutputBuffer] a new instance of RawOutputBuffer - # # pkg:gem/actionview#lib/action_view/buffers.rb:93 def initialize(buffer); end @@ -13492,8 +12423,6 @@ end # pkg:gem/actionview#lib/action_view/buffers.rb:150 class ActionView::RawStreamingBuffer - # @return [RawStreamingBuffer] a new instance of RawStreamingBuffer - # # pkg:gem/actionview#lib/action_view/buffers.rb:151 def initialize(buffer); end @@ -13588,8 +12517,6 @@ module ActionView::RecordIdentifier # dom_id(Post.find(45), :edit) # => "edit_post_45" # dom_id(Post, :custom) # => "custom_post" # - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/record_identifier.rb:93 def dom_id(record_or_class, prefix = T.unsafe(nil)); end @@ -13633,8 +12560,6 @@ ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) # pkg:gem/actionview#lib/action_view/render_parser.rb:8 class ActionView::RenderParser::Base - # @return [Base] a new instance of Base - # # pkg:gem/actionview#lib/action_view/render_parser.rb:9 def initialize(name, code); end @@ -13688,23 +12613,15 @@ ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) # # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:15 class ActionView::Renderer - # @return [Renderer] a new instance of Renderer - # # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:18 def initialize(lookup_context); end # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:52 def cache_hits; end - # Returns the value of attribute lookup_context. - # # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:16 def lookup_context; end - # Sets the attribute lookup_context - # - # @param value the value to set the attribute lookup_context to. - # # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:16 def lookup_context=(_arg0); end @@ -13825,8 +12742,6 @@ module ActionView::Rendering::ClassMethods # pkg:gem/actionview#lib/action_view/rendering.rb:76 def eager_load!; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/rendering.rb:52 def inherit_view_context_class?; end @@ -13870,8 +12785,6 @@ class ActionView::Resolver # because Resolver guarantees that the arguments are present and # normalized. # - # @raise [NotImplementedError] - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:84 def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end @@ -13898,33 +12811,15 @@ end # pkg:gem/actionview#lib/action_view/template/resolver.rb:13 class ActionView::Resolver::PathParser::ParsedPath < ::Struct - # Returns the value of attribute details - # - # @return [Object] the current value of details - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:13 def details; end - # Sets the attribute details - # - # @param value [Object] the value to set the attribute details to. - # @return [Object] the newly set value - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:13 def details=(_); end - # Returns the value of attribute path - # - # @return [Object] the current value of path - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:13 def path; end - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value - # # pkg:gem/actionview#lib/action_view/template/resolver.rb:13 def path=(_); end @@ -14043,16 +12938,12 @@ module ActionView::RoutingUrlFor # pkg:gem/actionview#lib/action_view/routing_url_for.rb:143 def ensure_only_path_option(options); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/routing_url_for.rb:134 def optimize_routes_generation?; end end # pkg:gem/actionview#lib/action_view/buffers.rb:108 class ActionView::StreamingBuffer - # @return [StreamingBuffer] a new instance of StreamingBuffer - # # pkg:gem/actionview#lib/action_view/buffers.rb:109 def initialize(block); end @@ -14062,8 +12953,6 @@ class ActionView::StreamingBuffer # pkg:gem/actionview#lib/action_view/buffers.rb:119 def append=(value); end - # Returns the value of attribute block. - # # pkg:gem/actionview#lib/action_view/buffers.rb:147 def block; end @@ -14076,8 +12965,6 @@ class ActionView::StreamingBuffer # pkg:gem/actionview#lib/action_view/buffers.rb:139 def html_safe; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/buffers.rb:135 def html_safe?; end @@ -14093,8 +12980,6 @@ end # pkg:gem/actionview#lib/action_view/flows.rb:30 class ActionView::StreamingFlow < ::ActionView::OutputFlow - # @return [StreamingFlow] a new instance of StreamingFlow - # # pkg:gem/actionview#lib/action_view/flows.rb:31 def initialize(view, fiber); end @@ -14114,8 +12999,6 @@ class ActionView::StreamingFlow < ::ActionView::OutputFlow private - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/flows.rb:71 def inside_fiber?; end end @@ -14146,8 +13029,6 @@ end # # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:13 class ActionView::StreamingTemplateRenderer::Body - # @return [Body] a new instance of Body - # # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:14 def initialize(&start); end @@ -14169,8 +13050,6 @@ end # pkg:gem/actionview#lib/action_view/template/error.rb:30 class ActionView::StrictLocalsError < ::ArgumentError - # @return [StrictLocalsError] a new instance of StrictLocalsError - # # pkg:gem/actionview#lib/action_view/template/error.rb:31 def initialize(argument_error, template); end end @@ -14179,8 +13058,6 @@ end class ActionView::StructuredEventSubscriber < ::ActiveSupport::StructuredEventSubscriber include ::ActionView::StructuredEventSubscriber::Utils - # @return [StructuredEventSubscriber] a new instance of StructuredEventSubscriber - # # pkg:gem/actionview#lib/action_view/structured_event_subscriber.rb:9 def initialize; end @@ -14229,8 +13106,6 @@ ActionView::StructuredEventSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Rege # pkg:gem/actionview#lib/action_view/template/error.rb:256 class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error - # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate - # # pkg:gem/actionview#lib/action_view/template/error.rb:257 def initialize(template, offending_code_string); end @@ -14248,8 +13123,6 @@ class ActionView::Template extend ::ActiveSupport::Autoload extend ::ActionView::Template::Handlers - # @return [Template] a new instance of Template - # # pkg:gem/actionview#lib/action_view/template.rb:199 def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end @@ -14266,18 +13139,12 @@ class ActionView::Template # pkg:gem/actionview#lib/action_view/template.rb:321 def encode!; end - # Returns the value of attribute format. - # # pkg:gem/actionview#lib/action_view/template.rb:195 def format; end - # Returns the value of attribute handler. - # # pkg:gem/actionview#lib/action_view/template.rb:194 def handler; end - # Returns the value of attribute identifier. - # # pkg:gem/actionview#lib/action_view/template.rb:194 def identifier; end @@ -14337,16 +13204,12 @@ class ActionView::Template # Returns whether a template is using strict locals. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template.rb:380 def strict_locals?; end # Returns whether the underlying handler supports streaming. If so, # a streaming buffer *may* be passed when it starts rendering. # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template.rb:261 def supports_streaming?; end @@ -14359,18 +13222,12 @@ class ActionView::Template # pkg:gem/actionview#lib/action_view/template.rb:292 def type; end - # Returns the value of attribute variable. - # # pkg:gem/actionview#lib/action_view/template.rb:195 def variable; end - # Returns the value of attribute variant. - # # pkg:gem/actionview#lib/action_view/template.rb:195 def variant; end - # Returns the value of attribute virtual_path. - # # pkg:gem/actionview#lib/action_view/template.rb:195 def virtual_path; end @@ -14446,8 +13303,6 @@ end # # pkg:gem/actionview#lib/action_view/template/error.rb:165 class ActionView::Template::Error < ::ActionView::ActionViewError - # @return [Error] a new instance of Error - # # pkg:gem/actionview#lib/action_view/template/error.rb:173 def initialize(template); end @@ -14480,8 +13335,6 @@ class ActionView::Template::Error < ::ActionView::ActionViewError # pkg:gem/actionview#lib/action_view/template/error.rb:218 def sub_template_of(template_path); end - # Returns the value of attribute template. - # # pkg:gem/actionview#lib/action_view/template/error.rb:171 def template; end @@ -14501,8 +13354,6 @@ ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) # # pkg:gem/actionview#lib/action_view/template/html.rb:6 class ActionView::Template::HTML - # @return [HTML] a new instance of HTML - # # pkg:gem/actionview#lib/action_view/template/html.rb:9 def initialize(string, type); end @@ -14540,8 +13391,6 @@ module ActionView::Template::Handlers # The handler must respond to +:call+, which will be passed the template # and should return the rendered template as a String. # - # @raise [ArgumentError] - # # pkg:gem/actionview#lib/action_view/template/handlers.rb:31 def register_template_handler(*extensions, handler); end @@ -14557,8 +13406,6 @@ module ActionView::Template::Handlers def unregister_template_handler(*extensions); end class << self - # @private - # # pkg:gem/actionview#lib/action_view/template/handlers.rb:12 def extended(base); end @@ -14638,8 +13485,6 @@ class ActionView::Template::Handlers::ERB # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list?; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:37 def handles_encoding?; end @@ -14652,8 +13497,6 @@ class ActionView::Template::Handlers::ERB # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines?; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:33 def supports_streaming?; end @@ -14673,8 +13516,6 @@ class ActionView::Template::Handlers::ERB # Use the difference between the compiled and source sizes to # determine the earliest line that could contain the highlight. # - # @raise [LocationParsingError] - # # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:119 def find_lineno_offset(compiled, source_lines, highlight, error_lineno); end @@ -14697,16 +13538,12 @@ class ActionView::Template::Handlers::ERB # the current token from looping past the next token if they both # match (i.e. if the current token is a single space character). # - # @raise [LocationParsingError] - # # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:152 def find_offset(compiled, source_tokens, error_column); end # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:177 def offset_source_tokens(source_tokens); end - # @raise [WrongEncodingError] - # # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:97 def valid_encoding(string, encoding); end @@ -14783,8 +13620,6 @@ ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:9 class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine - # @return [Erubi] a new instance of Erubi - # # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:11 def initialize(input, properties = T.unsafe(nil)); end @@ -14849,8 +13684,6 @@ ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) # # pkg:gem/actionview#lib/action_view/template/raw_file.rb:6 class ActionView::Template::RawFile - # @return [RawFile] a new instance of RawFile - # # pkg:gem/actionview#lib/action_view/template/raw_file.rb:9 def initialize(filename); end @@ -14866,8 +13699,6 @@ class ActionView::Template::RawFile # pkg:gem/actionview#lib/action_view/template/raw_file.rb:20 def render(*args); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/raw_file.rb:24 def supports_streaming?; end @@ -14882,8 +13713,6 @@ end # # pkg:gem/actionview#lib/action_view/template/renderable.rb:6 class ActionView::Template::Renderable - # @return [Renderable] a new instance of Renderable - # # pkg:gem/actionview#lib/action_view/template/renderable.rb:7 def initialize(renderable); end @@ -14905,8 +13734,6 @@ ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) # # pkg:gem/actionview#lib/action_view/template/types.rb:9 class ActionView::Template::SimpleType - # @return [SimpleType] a new instance of SimpleType - # # pkg:gem/actionview#lib/action_view/template/types.rb:29 def initialize(symbol); end @@ -14916,8 +13743,6 @@ class ActionView::Template::SimpleType # pkg:gem/actionview#lib/action_view/template/types.rb:38 def ref; end - # Returns the value of attribute symbol. - # # pkg:gem/actionview#lib/action_view/template/types.rb:27 def symbol; end @@ -14934,15 +13759,9 @@ class ActionView::Template::SimpleType # pkg:gem/actionview#lib/action_view/template/types.rb:14 def [](type); end - # Returns the value of attribute symbols. - # # pkg:gem/actionview#lib/action_view/template/types.rb:12 def symbols; end - # :nodoc - # - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template/types.rb:22 def valid_symbols?(symbols); end end @@ -14955,8 +13774,6 @@ end # pkg:gem/actionview#lib/action_view/template/sources/file.rb:6 class ActionView::Template::Sources::File - # @return [File] a new instance of File - # # pkg:gem/actionview#lib/action_view/template/sources/file.rb:7 def initialize(filename); end @@ -14968,8 +13785,6 @@ end # # pkg:gem/actionview#lib/action_view/template/text.rb:6 class ActionView::Template::Text - # @return [Text] a new instance of Text - # # pkg:gem/actionview#lib/action_view/template/text.rb:9 def initialize(string); end @@ -15000,90 +13815,60 @@ ActionView::Template::Types = Mime # pkg:gem/actionview#lib/action_view/template_details.rb:4 class ActionView::TemplateDetails - # @return [TemplateDetails] a new instance of TemplateDetails - # # pkg:gem/actionview#lib/action_view/template_details.rb:35 def initialize(locale, handler, format, variant); end - # Returns the value of attribute format. - # # pkg:gem/actionview#lib/action_view/template_details.rb:33 def format; end # pkg:gem/actionview#lib/action_view/template_details.rb:62 def format_or_default; end - # Returns the value of attribute handler. - # # pkg:gem/actionview#lib/action_view/template_details.rb:33 def handler; end # pkg:gem/actionview#lib/action_view/template_details.rb:58 def handler_class; end - # Returns the value of attribute locale. - # # pkg:gem/actionview#lib/action_view/template_details.rb:33 def locale; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template_details.rb:42 def matches?(requested); end # pkg:gem/actionview#lib/action_view/template_details.rb:49 def sort_key_for(requested); end - # Returns the value of attribute variant. - # # pkg:gem/actionview#lib/action_view/template_details.rb:33 def variant; end end # pkg:gem/actionview#lib/action_view/template_details.rb:5 class ActionView::TemplateDetails::Requested - # @return [Requested] a new instance of Requested - # # pkg:gem/actionview#lib/action_view/template_details.rb:11 def initialize(locale:, handlers:, formats:, variants:); end - # Returns the value of attribute formats. - # # pkg:gem/actionview#lib/action_view/template_details.rb:6 def formats; end - # Returns the value of attribute formats_idx. - # # pkg:gem/actionview#lib/action_view/template_details.rb:7 def formats_idx; end - # Returns the value of attribute handlers. - # # pkg:gem/actionview#lib/action_view/template_details.rb:6 def handlers; end - # Returns the value of attribute handlers_idx. - # # pkg:gem/actionview#lib/action_view/template_details.rb:7 def handlers_idx; end - # Returns the value of attribute locale. - # # pkg:gem/actionview#lib/action_view/template_details.rb:6 def locale; end - # Returns the value of attribute locale_idx. - # # pkg:gem/actionview#lib/action_view/template_details.rb:7 def locale_idx; end - # Returns the value of attribute variants. - # # pkg:gem/actionview#lib/action_view/template_details.rb:6 def variants; end - # Returns the value of attribute variants_idx. - # # pkg:gem/actionview#lib/action_view/template_details.rb:7 def variants_idx; end @@ -15109,61 +13894,39 @@ ActionView::TemplateError = ActionView::Template::Error # # pkg:gem/actionview#lib/action_view/template_path.rb:11 class ActionView::TemplatePath - # @return [TemplatePath] a new instance of TemplatePath - # # pkg:gem/actionview#lib/action_view/template_path.rb:47 def initialize(name, prefix, partial, virtual); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template_path.rb:64 def ==(other); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/template_path.rb:61 def eql?(other); end # pkg:gem/actionview#lib/action_view/template_path.rb:57 def hash; end - # Returns the value of attribute name. - # # pkg:gem/actionview#lib/action_view/template_path.rb:12 def name; end - # Returns the value of attribute partial. - # # pkg:gem/actionview#lib/action_view/template_path.rb:12 def partial; end - # Returns the value of attribute partial. - # # pkg:gem/actionview#lib/action_view/template_path.rb:13 def partial?; end - # Returns the value of attribute prefix. - # # pkg:gem/actionview#lib/action_view/template_path.rb:12 def prefix; end - # Returns the value of attribute virtual. - # # pkg:gem/actionview#lib/action_view/template_path.rb:55 def to_s; end - # Returns the value of attribute virtual. - # # pkg:gem/actionview#lib/action_view/template_path.rb:54 def to_str; end - # Returns the value of attribute virtual. - # # pkg:gem/actionview#lib/action_view/template_path.rb:12 def virtual; end - # Returns the value of attribute virtual. - # # pkg:gem/actionview#lib/action_view/template_path.rb:14 def virtual_path; end @@ -15386,30 +14149,18 @@ module ActionView::TestCase::Behavior # pkg:gem/actionview#lib/action_view/test_case.rb:281 def config; end - # Returns the value of attribute controller. - # # pkg:gem/actionview#lib/action_view/test_case.rb:63 def controller; end - # Sets the attribute controller - # - # @param value the value to set the attribute controller to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:63 def controller=(_arg0); end # pkg:gem/actionview#lib/action_view/test_case.rb:62 def lookup_context(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute output_buffer. - # # pkg:gem/actionview#lib/action_view/test_case.rb:63 def output_buffer; end - # Sets the attribute output_buffer - # - # @param value the value to set the attribute output_buffer to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:63 def output_buffer=(_arg0); end @@ -15521,15 +14272,9 @@ module ActionView::TestCase::Behavior # pkg:gem/actionview#lib/action_view/test_case.rb:291 def rendered_views; end - # Returns the value of attribute request. - # # pkg:gem/actionview#lib/action_view/test_case.rb:63 def request; end - # Sets the attribute request - # - # @param value the value to set the attribute request to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:63 def request=(_arg0); end @@ -15541,8 +14286,6 @@ module ActionView::TestCase::Behavior # pkg:gem/actionview#lib/action_view/test_case.rb:401 def _user_defined_ivars; end - # The instance of ActionView::Base that is used by +render+. - # # pkg:gem/actionview#lib/action_view/test_case.rb:364 def _view; end @@ -15554,8 +14297,6 @@ module ActionView::TestCase::Behavior # pkg:gem/actionview#lib/action_view/test_case.rb:415 def method_missing(selector, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/test_case.rb:431 def respond_to_missing?(name, include_private = T.unsafe(nil)); end @@ -15596,10 +14337,6 @@ module ActionView::TestCase::Behavior::ClassMethods # pkg:gem/actionview#lib/action_view/test_case.rb:232 def helper_class; end - # Sets the attribute helper_class - # - # @param value the value to set the attribute helper_class to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:230 def helper_class=(_arg0); end @@ -15702,15 +14439,9 @@ module ActionView::TestCase::Behavior::Locals # pkg:gem/actionview#lib/action_view/test_case.rb:336 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil)); end - # Returns the value of attribute rendered_views. - # # pkg:gem/actionview#lib/action_view/test_case.rb:334 def rendered_views; end - # Sets the attribute rendered_views - # - # @param value the value to set the attribute rendered_views to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:334 def rendered_views=(_arg0); end end @@ -15726,8 +14457,6 @@ end # pkg:gem/actionview#lib/action_view/test_case.rb:302 class ActionView::TestCase::Behavior::RenderedViewsCollection - # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection - # # pkg:gem/actionview#lib/action_view/test_case.rb:303 def initialize; end @@ -15740,8 +14469,6 @@ class ActionView::TestCase::Behavior::RenderedViewsCollection # pkg:gem/actionview#lib/action_view/test_case.rb:316 def rendered_views; end - # @return [Boolean] - # # pkg:gem/actionview#lib/action_view/test_case.rb:320 def view_rendered?(view, expected_locals); end end @@ -15760,47 +14487,27 @@ class ActionView::TestCase::TestController < ::ActionController::Base include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess - # @return [TestController] a new instance of TestController - # # pkg:gem/actionview#lib/action_view/test_case.rb:34 def initialize; end # pkg:gem/actionview#lib/action_view/test_case.rb:26 def controller_path=(path); end - # Returns the value of attribute params. - # # pkg:gem/actionview#lib/action_view/test_case.rb:19 def params; end - # Sets the attribute params - # - # @param value the value to set the attribute params to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:19 def params=(_arg0); end - # Returns the value of attribute request. - # # pkg:gem/actionview#lib/action_view/test_case.rb:19 def request; end - # Sets the attribute request - # - # @param value the value to set the attribute request to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:19 def request=(_arg0); end - # Returns the value of attribute response. - # # pkg:gem/actionview#lib/action_view/test_case.rb:19 def response; end - # Sets the attribute response - # - # @param value the value to set the attribute response to. - # # pkg:gem/actionview#lib/action_view/test_case.rb:19 def response=(_arg0); end @@ -15841,8 +14548,6 @@ end # pkg:gem/actionview#lib/action_view/unbound_template.rb:6 class ActionView::UnboundTemplate - # @return [UnboundTemplate] a new instance of UnboundTemplate - # # pkg:gem/actionview#lib/action_view/unbound_template.rb:10 def initialize(source, identifier, details:, virtual_path:); end @@ -15852,8 +14557,6 @@ class ActionView::UnboundTemplate # pkg:gem/actionview#lib/action_view/unbound_template.rb:44 def built_templates; end - # Returns the value of attribute details. - # # pkg:gem/actionview#lib/action_view/unbound_template.rb:7 def details; end @@ -15869,8 +14572,6 @@ class ActionView::UnboundTemplate # pkg:gem/actionview#lib/action_view/unbound_template.rb:8 def variant(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute virtual_path. - # # pkg:gem/actionview#lib/action_view/unbound_template.rb:7 def virtual_path; end @@ -16023,11 +14724,19 @@ end # pkg:gem/actionview#lib/action_view/template/error.rb:14 class ActionView::WrongEncodingError < ::ActionView::EncodingError - # @return [WrongEncodingError] a new instance of WrongEncodingError - # # pkg:gem/actionview#lib/action_view/template/error.rb:15 def initialize(string, encoding); end # pkg:gem/actionview#lib/action_view/template/error.rb:19 def message; end end + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end diff --git a/sorbet/rbi/gems/activejob@8.1.2.rbi b/sorbet/rbi/gems/activejob@8.1.2.rbi index f08ef6313..4e5c2d919 100644 --- a/sorbet/rbi/gems/activejob@8.1.2.rbi +++ b/sorbet/rbi/gems/activejob@8.1.2.rbi @@ -77,8 +77,6 @@ module ActiveJob::Arguments # pkg:gem/activejob#lib/active_job/arguments.rb:191 def convert_to_global_id_hash(argument); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/arguments.rb:136 def custom_serialized?(hash); end @@ -100,8 +98,6 @@ module ActiveJob::Arguments # pkg:gem/activejob#lib/active_job/arguments.rb:172 def serialize_indifferent_hash(indifferent_hash); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/arguments.rb:128 def serialized_global_id?(hash); end @@ -689,13 +685,9 @@ end # pkg:gem/activejob#lib/active_job/configured_job.rb:4 class ActiveJob::ConfiguredJob - # @return [ConfiguredJob] a new instance of ConfiguredJob - # # pkg:gem/activejob#lib/active_job/configured_job.rb:5 def initialize(job_class, options = T.unsafe(nil)); end - # @yield [job] - # # pkg:gem/activejob#lib/active_job/configured_job.rb:14 def perform_later(*_arg0, **_arg1, &_arg2); end @@ -731,8 +723,6 @@ module ActiveJob::Continuable # pkg:gem/activejob#lib/active_job/continuable.rb:56 def deserialize(job_data); end - # @raise [Continuation::Interrupt] - # # pkg:gem/activejob#lib/active_job/continuable.rb:66 def interrupt!(reason:); end @@ -969,13 +959,9 @@ class ActiveJob::Continuation include ::ActiveJob::Continuation::Validation extend ::ActiveSupport::Autoload - # @return [Continuation] a new instance of Continuation - # # pkg:gem/activejob#lib/active_job/continuation.rb:214 def initialize(job, serialized_progress); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation.rb:256 def advanced?; end @@ -985,8 +971,6 @@ class ActiveJob::Continuation # pkg:gem/activejob#lib/active_job/continuation.rb:260 def instrumentation; end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation.rb:252 def started?; end @@ -998,23 +982,15 @@ class ActiveJob::Continuation private - # Returns the value of attribute completed. - # # pkg:gem/activejob#lib/active_job/continuation.rb:267 def completed; end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation.rb:277 def completed?(name); end - # Returns the value of attribute current. - # # pkg:gem/activejob#lib/active_job/continuation.rb:267 def current; end - # Returns the value of attribute encountered. - # # pkg:gem/activejob#lib/active_job/continuation.rb:267 def encountered; end @@ -1024,13 +1000,9 @@ class ActiveJob::Continuation # pkg:gem/activejob#lib/active_job/continuation.rb:315 def instrumenting_step(step, &block); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation.rb:273 def isolating?; end - # Returns the value of attribute job. - # # pkg:gem/activejob#lib/active_job/continuation.rb:267 def job; end @@ -1043,8 +1015,6 @@ class ActiveJob::Continuation # pkg:gem/activejob#lib/active_job/continuation.rb:299 def run_step_inline(name, start:, **options, &block); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation.rb:269 def running_step?; end @@ -1096,8 +1066,6 @@ class ActiveJob::Continuation::ResumeLimitError < ::ActiveJob::Continuation::Err # # pkg:gem/activejob#lib/active_job/continuation/step.rb:18 class ActiveJob::Continuation::Step - # @return [Step] a new instance of Step - # # pkg:gem/activejob#lib/active_job/continuation/step.rb:25 def initialize(name, cursor, job:, resumed:); end @@ -1111,8 +1079,6 @@ class ActiveJob::Continuation::Step # Has the cursor been advanced during this job execution? # - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation/step.rb:67 def advanced?; end @@ -1137,8 +1103,6 @@ class ActiveJob::Continuation::Step # Has this step been resumed from a previous job execution? # - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/continuation/step.rb:62 def resumed?; end @@ -1152,13 +1116,9 @@ class ActiveJob::Continuation::Step private - # Returns the value of attribute initial_cursor. - # # pkg:gem/activejob#lib/active_job/continuation/step.rb:80 def initial_cursor; end - # Returns the value of attribute job. - # # pkg:gem/activejob#lib/active_job/continuation/step.rb:80 def job; end end @@ -1172,8 +1132,6 @@ class ActiveJob::Continuation::UnadvanceableCursorError < ::ActiveJob::Continuat module ActiveJob::Continuation::Validation private - # @raise [InvalidStepError] - # # pkg:gem/activejob#lib/active_job/continuation/validation.rb:45 def raise_step_error!(message); end @@ -1355,10 +1313,6 @@ module ActiveJob::Core # pkg:gem/activejob#lib/active_job/core.rb:117 def serialize; end - # Sets the attribute serialized_arguments - # - # @param value the value to set the attribute serialized_arguments to. - # # pkg:gem/activejob#lib/active_job/core.rb:20 def serialized_arguments=(_arg0); end @@ -1372,8 +1326,6 @@ module ActiveJob::Core # pkg:gem/activejob#lib/active_job/core.rb:56 def successfully_enqueued=(_arg0); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/core.rb:58 def successfully_enqueued?; end @@ -1389,8 +1341,6 @@ module ActiveJob::Core private - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/core.rb:208 def arguments_serialized?; end @@ -1417,8 +1367,6 @@ end module ActiveJob::Core::ClassMethods # Creates a new job instance from a hash created with +serialize+ # - # @raise [UnknownJobClassError] - # # pkg:gem/activejob#lib/active_job/core.rb:69 def deserialize(job_data); end @@ -1451,8 +1399,6 @@ end # # pkg:gem/activejob#lib/active_job/arguments.rb:10 class ActiveJob::DeserializationError < ::StandardError - # @return [DeserializationError] a new instance of DeserializationError - # # pkg:gem/activejob#lib/active_job/arguments.rb:11 def initialize; end end @@ -1465,8 +1411,6 @@ module ActiveJob::EnqueueAfterTransactionCommit def raw_enqueue; end class << self - # @private - # # pkg:gem/activejob#lib/active_job/enqueue_after_transaction_commit.rb:6 def included(base); end end @@ -1559,8 +1503,6 @@ module ActiveJob::Enqueuing::ClassMethods # self.enqueue_after_transaction_commit = false # end # - # @yield [job] - # # pkg:gem/activejob#lib/active_job/enqueuing.rb:81 def perform_later(*_arg0, **_arg1, &_arg2); end @@ -1950,8 +1892,6 @@ module ActiveJob::Logging private - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/logging.rb:45 def logger_tagged_by_active_job?; end @@ -2019,8 +1959,6 @@ module ActiveJob::QueueAdapter::ClassMethods # pkg:gem/activejob#lib/active_job/queue_adapter.rb:66 def assign_adapter(adapter_name, queue_adapter); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapter.rb:73 def queue_adapter?(object); end end @@ -2161,30 +2099,18 @@ ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String) # # pkg:gem/activejob#lib/active_job/queue_adapters/abstract_adapter.rb:9 class ActiveJob::QueueAdapters::AbstractAdapter - # @raise [NotImplementedError] - # # pkg:gem/activejob#lib/active_job/queue_adapters/abstract_adapter.rb:12 def enqueue(job); end - # @raise [NotImplementedError] - # # pkg:gem/activejob#lib/active_job/queue_adapters/abstract_adapter.rb:16 def enqueue_at(job, timestamp); end - # Returns the value of attribute stopping. - # # pkg:gem/activejob#lib/active_job/queue_adapters/abstract_adapter.rb:10 def stopping; end - # Sets the attribute stopping - # - # @param value the value to set the attribute stopping to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/abstract_adapter.rb:10 def stopping=(_arg0); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapters/abstract_adapter.rb:20 def stopping?; end end @@ -2217,8 +2143,6 @@ end class ActiveJob::QueueAdapters::AsyncAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter # See {Concurrent::ThreadPoolExecutor}[https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadPoolExecutor.html] for executor options. # - # @return [AsyncAdapter] a new instance of AsyncAdapter - # # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:35 def initialize(**executor_options); end @@ -2248,8 +2172,6 @@ end # # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:63 class ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper - # @return [JobWrapper] a new instance of JobWrapper - # # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:64 def initialize(job); end @@ -2259,8 +2181,6 @@ end # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:74 class ActiveJob::QueueAdapters::AsyncAdapter::Scheduler - # @return [Scheduler] a new instance of Scheduler - # # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:86 def initialize(**options); end @@ -2273,15 +2193,9 @@ class ActiveJob::QueueAdapters::AsyncAdapter::Scheduler # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:114 def executor; end - # Returns the value of attribute immediate. - # # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:84 def immediate; end - # Sets the attribute immediate - # - # @param value the value to set the attribute immediate to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/async_adapter.rb:84 def immediate=(_arg0); end @@ -2306,8 +2220,6 @@ class ActiveJob::QueueAdapters::InlineAdapter < ::ActiveJob::QueueAdapters::Abst # pkg:gem/activejob#lib/active_job/queue_adapters/inline_adapter.rb:14 def enqueue(job); end - # @raise [NotImplementedError] - # # pkg:gem/activejob#lib/active_job/queue_adapters/inline_adapter.rb:18 def enqueue_at(*_arg0); end end @@ -2324,15 +2236,9 @@ end # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:14 class ActiveJob::QueueAdapters::TestAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter - # Returns the value of attribute at. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def at; end - # Sets the attribute at - # - # @param value the value to set the attribute at to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def at=(_arg0); end @@ -2347,46 +2253,26 @@ class ActiveJob::QueueAdapters::TestAdapter < ::ActiveJob::QueueAdapters::Abstra # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:19 def enqueued_jobs; end - # Sets the attribute enqueued_jobs - # - # @param value the value to set the attribute enqueued_jobs to. + # Provides a store of all the enqueued jobs with the TestAdapter so you can check them. # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:16 def enqueued_jobs=(_arg0); end - # Returns the value of attribute filter. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def filter; end - # Sets the attribute filter - # - # @param value the value to set the attribute filter to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def filter=(_arg0); end - # Returns the value of attribute perform_enqueued_at_jobs. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def perform_enqueued_at_jobs; end - # Sets the attribute perform_enqueued_at_jobs - # - # @param value the value to set the attribute perform_enqueued_at_jobs to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def perform_enqueued_at_jobs=(_arg0); end - # Returns the value of attribute perform_enqueued_jobs. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def perform_enqueued_jobs; end - # Sets the attribute perform_enqueued_jobs - # - # @param value the value to set the attribute perform_enqueued_jobs to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def perform_enqueued_jobs=(_arg0); end @@ -2395,51 +2281,29 @@ class ActiveJob::QueueAdapters::TestAdapter < ::ActiveJob::QueueAdapters::Abstra # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:24 def performed_jobs; end - # Sets the attribute performed_jobs - # - # @param value the value to set the attribute performed_jobs to. + # Provides a store of all the performed jobs with the TestAdapter so you can check them. # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:16 def performed_jobs=(_arg0); end - # Returns the value of attribute queue. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def queue; end - # Sets the attribute queue - # - # @param value the value to set the attribute queue to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def queue=(_arg0); end - # Returns the value of attribute reject. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def reject; end - # Sets the attribute reject - # - # @param value the value to set the attribute reject to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def reject=(_arg0); end - # Returns the value of attribute stopping. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def stopping; end - # Sets the attribute stopping - # - # @param value the value to set the attribute stopping to. - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:15 def stopping=(_arg0); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:38 def stopping?; end @@ -2448,23 +2312,15 @@ class ActiveJob::QueueAdapters::TestAdapter < ::ActiveJob::QueueAdapters::Abstra # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:83 def filter_as_proc(filter); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:61 def filtered?(job); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:75 def filtered_job_class?(job); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:69 def filtered_queue?(job); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/queue_adapters/test_adapter.rb:65 def filtered_time?(job); end @@ -2671,8 +2527,6 @@ module ActiveJob::Serializers # Will look up through all known serializers. # If no serializer found will raise ArgumentError. # - # @raise [ArgumentError] - # # pkg:gem/activejob#lib/active_job/serializers.rb:40 def deserialize(argument); end @@ -2680,8 +2534,6 @@ module ActiveJob::Serializers # Will look up through all known serializers. # Raises ActiveJob::SerializationError if it can't find a proper serializer. # - # @raise [SerializationError] - # # pkg:gem/activejob#lib/active_job/serializers.rb:31 def serialize(argument); end @@ -2705,8 +2557,6 @@ end # pkg:gem/activejob#lib/active_job/serializers/action_controller_parameters_serializer.rb:5 class ActiveJob::Serializers::ActionControllerParametersSerializer < ::ActiveJob::Serializers::ObjectSerializer - # @raise [NotImplementedError] - # # pkg:gem/activejob#lib/active_job/serializers/action_controller_parameters_serializer.rb:10 def deserialize(hash); end @@ -2716,8 +2566,6 @@ class ActiveJob::Serializers::ActionControllerParametersSerializer < ::ActiveJob # pkg:gem/activejob#lib/active_job/serializers/action_controller_parameters_serializer.rb:6 def serialize(argument); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/serializers/action_controller_parameters_serializer.rb:14 def serialize?(argument); end end @@ -2775,8 +2623,6 @@ class ActiveJob::Serializers::ModuleSerializer < ::ActiveJob::Serializers::Objec # pkg:gem/activejob#lib/active_job/serializers/module_serializer.rb:15 def klass; end - # @raise [SerializationError] - # # pkg:gem/activejob#lib/active_job/serializers/module_serializer.rb:6 def serialize(constant); end end @@ -2804,19 +2650,14 @@ ActiveJob::Serializers::OBJECT_SERIALIZER_KEY = T.let(T.unsafe(nil), String) # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:24 class ActiveJob::Serializers::ObjectSerializer - include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # @return [ObjectSerializer] a new instance of ObjectSerializer - # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:31 def initialize; end # Deserializes an argument from a JSON primitive type. # - # @raise [NotImplementedError] - # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:47 def deserialize(hash); end @@ -2827,18 +2668,22 @@ class ActiveJob::Serializers::ObjectSerializer # Determines if an argument should be serialized by a serializer. # - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:37 def serialize?(argument); end class << self + # Deserializes an argument from a JSON primitive type. + # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:28 def deserialize(*_arg0, **_arg1, &_arg2); end + # Serializes an argument to a JSON primitive type. + # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:28 def serialize(*_arg0, **_arg1, &_arg2); end + # Determines if an argument should be serialized by a serializer. + # # pkg:gem/activejob#lib/active_job/serializers/object_serializer.rb:28 def serialize?(*_arg0, **_arg1, &_arg2); end @@ -3469,13 +3314,9 @@ module ActiveJob::TestHelper # pkg:gem/activejob#lib/active_job/test_helper.rb:666 def require_active_job_test_adapter!(method); end - # @return [Boolean] - # # pkg:gem/activejob#lib/active_job/test_helper.rb:672 def using_test_adapter?; end - # @raise [ArgumentError] - # # pkg:gem/activejob#lib/active_job/test_helper.rb:766 def validate_option(only: T.unsafe(nil), except: T.unsafe(nil)); end end @@ -3512,8 +3353,6 @@ end # # pkg:gem/activejob#lib/active_job/core.rb:5 class ActiveJob::UnknownJobClassError < ::NameError - # @return [UnknownJobClassError] a new instance of UnknownJobClassError - # # pkg:gem/activejob#lib/active_job/core.rb:6 def initialize(job_class_name); end end diff --git a/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi b/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi index 819fcfe6e..0bcdb5f80 100644 --- a/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +++ b/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi @@ -78,13 +78,9 @@ end # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:18 class ActiveModel::Serializers::Xml::Serializer - # @return [Serializer] a new instance of Serializer - # # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:57 def initialize(serializable, options = T.unsafe(nil)); end - # Returns the value of attribute options. - # # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:55 def options; end @@ -119,26 +115,18 @@ end # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:19 class ActiveModel::Serializers::Xml::Serializer::Attribute - # @return [Attribute] a new instance of Attribute - # # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:22 def initialize(name, serializable, value); end # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:33 def decorations; end - # Returns the value of attribute name. - # # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:20 def name; end - # Returns the value of attribute type. - # # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:20 def type; end - # Returns the value of attribute value. - # # pkg:gem/activemodel-serializers-xml#lib/active_model/serializers/xml.rb:20 def value; end diff --git a/sorbet/rbi/gems/activemodel@8.1.2.rbi b/sorbet/rbi/gems/activemodel@8.1.2.rbi index 4cc6675fa..d0a2134ca 100644 --- a/sorbet/rbi/gems/activemodel@8.1.2.rbi +++ b/sorbet/rbi/gems/activemodel@8.1.2.rbi @@ -130,8 +130,6 @@ module ActiveModel::API # person = Person.new(id: 1, name: 'bob') # person.persisted? # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/api.rb:95 def persisted?; end @@ -168,26 +166,18 @@ class ActiveModel::Attribute # This method should not be called directly. # Use #from_database or #from_user # - # @return [Attribute] a new instance of Attribute - # # pkg:gem/activemodel#lib/active_model/attribute.rb:33 def initialize(name, value_before_type_cast, type, original_attribute = T.unsafe(nil), value = T.unsafe(nil)); end # pkg:gem/activemodel#lib/active_model/attribute.rb:123 def ==(other); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:115 def came_from_user?; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:66 def changed?; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:70 def changed_in_place?; end @@ -203,8 +193,6 @@ class ActiveModel::Attribute # pkg:gem/activemodel#lib/active_model/attribute.rb:74 def forgetting_assignment; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:119 def has_been_read?; end @@ -214,13 +202,9 @@ class ActiveModel::Attribute # pkg:gem/activemodel#lib/active_model/attribute.rb:135 def init_with(coder); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:111 def initialized?; end - # Returns the value of attribute name. - # # pkg:gem/activemodel#lib/active_model/attribute.rb:29 def name; end @@ -230,26 +214,18 @@ class ActiveModel::Attribute # pkg:gem/activemodel#lib/active_model/attribute.rb:151 def original_value_for_database; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:62 def serializable?(&block); end - # Returns the value of attribute type. - # # pkg:gem/activemodel#lib/active_model/attribute.rb:29 def type; end - # @raise [NotImplementedError] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:107 def type_cast(*_arg0); end # pkg:gem/activemodel#lib/active_model/attribute.rb:41 def value(&_arg0); end - # Returns the value of attribute value_before_type_cast. - # # pkg:gem/activemodel#lib/active_model/attribute.rb:29 def value_before_type_cast; end @@ -279,21 +255,15 @@ class ActiveModel::Attribute # pkg:gem/activemodel#lib/active_model/attribute.rb:173 def _value_for_database; end - # Returns the value of attribute original_attribute. - # # pkg:gem/activemodel#lib/active_model/attribute.rb:161 def assigned?; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:169 def changed_from_assignment?; end # pkg:gem/activemodel#lib/active_model/attribute.rb:163 def initialize_dup(other); end - # Returns the value of attribute original_attribute. - # # pkg:gem/activemodel#lib/active_model/attribute.rb:160 def original_attribute; end @@ -331,8 +301,6 @@ end # pkg:gem/activemodel#lib/active_model/attribute.rb:205 class ActiveModel::Attribute::FromUser < ::ActiveModel::Attribute - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:210 def came_from_user?; end @@ -347,45 +315,33 @@ end # pkg:gem/activemodel#lib/active_model/attribute.rb:230 class ActiveModel::Attribute::Null < ::ActiveModel::Attribute - # @return [Null] a new instance of Null - # # pkg:gem/activemodel#lib/active_model/attribute.rb:231 def initialize(name); end # pkg:gem/activemodel#lib/active_model/attribute.rb:235 def type_cast(*_arg0); end - # @raise [ActiveModel::MissingAttributeError] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:247 def with_cast_value(value); end # pkg:gem/activemodel#lib/active_model/attribute.rb:239 def with_type(type); end - # @raise [ActiveModel::MissingAttributeError] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:243 def with_value_from_database(value); end - # @raise [ActiveModel::MissingAttributeError] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:246 def with_value_from_user(value); end end # pkg:gem/activemodel#lib/active_model/attribute.rb:250 class ActiveModel::Attribute::Uninitialized < ::ActiveModel::Attribute - # @return [Uninitialized] a new instance of Uninitialized - # # pkg:gem/activemodel#lib/active_model/attribute.rb:253 def initialize(name, type); end # pkg:gem/activemodel#lib/active_model/attribute.rb:274 def forgetting_assignment; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:270 def initialized?; end @@ -407,8 +363,6 @@ ActiveModel::Attribute::Uninitialized::UNINITIALIZED_ORIGINAL_VALUE = T.let(T.un # pkg:gem/activemodel#lib/active_model/attribute/user_provided_default.rb:11 class ActiveModel::Attribute::UserProvidedDefault < ::ActiveModel::Attribute::FromUser - # @return [UserProvidedDefault] a new instance of UserProvidedDefault - # # pkg:gem/activemodel#lib/active_model/attribute/user_provided_default.rb:12 def initialize(name, value, type, database_default); end @@ -429,16 +383,12 @@ class ActiveModel::Attribute::UserProvidedDefault < ::ActiveModel::Attribute::Fr private - # Returns the value of attribute user_provided_value. - # # pkg:gem/activemodel#lib/active_model/attribute/user_provided_default.rb:62 def user_provided_value; end end # pkg:gem/activemodel#lib/active_model/attribute.rb:220 class ActiveModel::Attribute::WithCastValue < ::ActiveModel::Attribute - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute.rb:225 def changed_in_place?; end @@ -491,31 +441,9 @@ module ActiveModel::AttributeAssignment # rectangle = Rectangle.new # rectangle.assign_attributes(height: 10) # => Logs "Tried to assign to unknown attribute 'height'" # - # @raise [UnknownAttributeError] - # # pkg:gem/activemodel#lib/active_model/attribute_assignment.rb:56 def attribute_writer_missing(name, value); end - # Allows you to set all the attributes by passing in a hash of attributes with - # keys matching the attribute names. - # - # If the passed hash responds to permitted? method and the return value - # of this method is +false+ an ActiveModel::ForbiddenAttributesError - # exception is raised. - # - # class Cat - # include ActiveModel::AttributeAssignment - # attr_accessor :name, :status - # end - # - # cat = Cat.new - # cat.assign_attributes(name: "Gorby", status: "yawning") - # cat.name # => 'Gorby' - # cat.status # => 'yawning' - # cat.assign_attributes(status: "sleeping") - # cat.name # => 'Gorby' - # cat.status # => 'sleeping' - # # pkg:gem/activemodel#lib/active_model/attribute_assignment.rb:37 def attributes=(new_attributes); end @@ -605,8 +533,6 @@ module ActiveModel::AttributeMethods # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:507 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:528 def respond_to?(method, include_private_methods = T.unsafe(nil)); end @@ -622,8 +548,6 @@ module ActiveModel::AttributeMethods # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:556 def _read_attribute(attr); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:541 def attribute_method?(attr_name); end @@ -633,8 +557,6 @@ module ActiveModel::AttributeMethods # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:547 def matched_attribute_method(method_name); end - # @raise [ActiveModel::MissingAttributeError] - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:552 def missing_attribute(attr_name, stack); end @@ -726,8 +648,6 @@ module ActiveModel::AttributeMethods::ClassMethods # Is +new_name+ an alias? # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:240 def attribute_alias?(new_name); end @@ -966,8 +886,6 @@ module ActiveModel::AttributeMethods::ClassMethods # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:387 def inherited(base); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:404 def instance_method_already_implemented?(method_name); end @@ -977,8 +895,6 @@ end # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:471 class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern - # @return [AttributeMethodPattern] a new instance of AttributeMethodPattern - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:476 def initialize(prefix: T.unsafe(nil), suffix: T.unsafe(nil), parameters: T.unsafe(nil)); end @@ -988,56 +904,30 @@ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:491 def method_name(attr_name); end - # Returns the value of attribute parameters. - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:472 def parameters; end - # Returns the value of attribute prefix. - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:472 def prefix; end - # Returns the value of attribute proxy_target. - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:472 def proxy_target; end - # Returns the value of attribute suffix. - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:472 def suffix; end end # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:474 class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern::AttributeMethod < ::Struct - # Returns the value of attribute attr_name - # - # @return [Object] the current value of attr_name - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:474 def attr_name; end - # Sets the attribute attr_name - # - # @param value [Object] the value to set the attribute attr_name to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:474 def attr_name=(_); end - # Returns the value of attribute proxy_target - # - # @return [Object] the current value of proxy_target - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:474 def proxy_target; end - # Sets the attribute proxy_target - # - # @param value [Object] the value to set the attribute proxy_target to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_methods.rb:474 def proxy_target=(_); end @@ -1064,29 +954,21 @@ ActiveModel::AttributeMethods::NAME_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Reg # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:7 class ActiveModel::AttributeMutationTracker - # @return [AttributeMutationTracker] a new instance of AttributeMutationTracker - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:10 def initialize(attributes); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:40 def any_changes?; end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:34 def change_to_attribute(attr_name); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:44 def changed?(attr_name, from: T.unsafe(nil), to: T.unsafe(nil)); end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:14 def changed_attribute_names; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:50 def changed_in_place?(attr_name); end @@ -1110,13 +992,9 @@ class ActiveModel::AttributeMutationTracker # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:74 def attr_names; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:78 def attribute_changed?(attr_name); end - # Returns the value of attribute attributes. - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:68 def attributes; end @@ -1190,33 +1068,15 @@ class ActiveModel::AttributeRegistration::ClassMethods::PendingDecorator < ::Str # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:68 def apply_to(attribute_set); end - # Returns the value of attribute decorator - # - # @return [Object] the current value of decorator - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:67 def decorator; end - # Sets the attribute decorator - # - # @param value [Object] the value to set the attribute decorator to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:67 def decorator=(_); end - # Returns the value of attribute names - # - # @return [Object] the current value of names - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:67 def names; end - # Sets the attribute names - # - # @param value [Object] the value to set the attribute names to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:67 def names=(_); end @@ -1243,33 +1103,15 @@ class ActiveModel::AttributeRegistration::ClassMethods::PendingDefault < ::Struc # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:62 def apply_to(attribute_set); end - # Returns the value of attribute default - # - # @return [Object] the current value of default - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:61 def default; end - # Sets the attribute default - # - # @param value [Object] the value to set the attribute default to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:61 def default=(_); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:61 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:61 def name=(_); end @@ -1296,33 +1138,15 @@ class ActiveModel::AttributeRegistration::ClassMethods::PendingType < ::Struct # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:55 def apply_to(attribute_set); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:54 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:54 def name=(_); end - # Returns the value of attribute type - # - # @return [Object] the current value of type - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:54 def type; end - # Sets the attribute type - # - # @param value [Object] the value to set the attribute type to. - # @return [Object] the newly set value - # # pkg:gem/activemodel#lib/active_model/attribute_registration.rb:54 def type=(_); end @@ -1346,8 +1170,6 @@ end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:6 class ActiveModel::AttributeSet - # @return [AttributeSet] a new instance of AttributeSet - # # pkg:gem/activemodel#lib/active_model/attribute_set.rb:12 def initialize(attributes); end @@ -1384,13 +1206,9 @@ class ActiveModel::AttributeSet # pkg:gem/activemodel#lib/active_model/attribute_set.rb:68 def freeze; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_set.rb:44 def include?(name); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_set.rb:41 def key?(name); end @@ -1424,15 +1242,11 @@ class ActiveModel::AttributeSet # pkg:gem/activemodel#lib/active_model/attribute_set.rb:54 def write_from_database(name, value); end - # @raise [FrozenError] - # # pkg:gem/activemodel#lib/active_model/attribute_set.rb:58 def write_from_user(name, value); end protected - # Returns the value of attribute attributes. - # # pkg:gem/activemodel#lib/active_model/attribute_set.rb:111 def attributes; end @@ -1450,21 +1264,15 @@ end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:7 class ActiveModel::AttributeSet::Builder - # @return [Builder] a new instance of Builder - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:10 def initialize(types, default_attributes = T.unsafe(nil)); end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:15 def build_from_database(values = T.unsafe(nil), additional_types = T.unsafe(nil)); end - # Returns the value of attribute default_attributes. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:8 def default_attributes; end - # Returns the value of attribute types. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:8 def types; end end @@ -1474,8 +1282,6 @@ end # # pkg:gem/activemodel#lib/active_model/attribute_set/yaml_encoder.rb:7 class ActiveModel::AttributeSet::YAMLEncoder - # @return [YAMLEncoder] a new instance of YAMLEncoder - # # pkg:gem/activemodel#lib/active_model/attribute_set/yaml_encoder.rb:8 def initialize(default_types); end @@ -1487,8 +1293,6 @@ class ActiveModel::AttributeSet::YAMLEncoder private - # Returns the value of attribute default_types. - # # pkg:gem/activemodel#lib/active_model/attribute_set/yaml_encoder.rb:37 def default_types; end end @@ -1818,8 +1622,6 @@ class ActiveModel::Attributes::Normalization::NormalizedValueType include ::ActiveModel::Type::SerializeCastValue extend ::ActiveModel::Type::SerializeCastValue::ClassMethods - # @return [NormalizedValueType] a new instance of NormalizedValueType - # # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:152 def initialize(cast_type:, normalizer:, normalize_nil:); end @@ -1829,8 +1631,6 @@ class ActiveModel::Attributes::Normalization::NormalizedValueType # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:159 def cast(value); end - # Returns the value of attribute cast_type. - # # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:149 def cast_type; end @@ -1843,18 +1643,12 @@ class ActiveModel::Attributes::Normalization::NormalizedValueType # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:183 def inspect; end - # Returns the value of attribute normalize_nil. - # # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:149 def normalize_nil; end - # Returns the value of attribute normalize_nil. - # # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:150 def normalize_nil?; end - # Returns the value of attribute normalizer. - # # pkg:gem/activemodel#lib/active_model/attributes/normalization.rb:149 def normalizer; end @@ -1875,8 +1669,6 @@ end # # pkg:gem/activemodel#lib/active_model/validator.rb:179 class ActiveModel::BlockValidator < ::ActiveModel::EachValidator - # @return [BlockValidator] a new instance of BlockValidator - # # pkg:gem/activemodel#lib/active_model/validator.rb:180 def initialize(options, &block); end @@ -2256,20 +2048,14 @@ module ActiveModel::Dirty # Dispatch target for {*_changed?}[rdoc-ref:#*_changed?] attribute methods. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/dirty.rb:300 def attribute_changed?(attr_name, **options); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/dirty.rb:367 def attribute_changed_in_place?(attr_name); end # Dispatch target for {*_previously_changed?}[rdoc-ref:#*_previously_changed?] attribute methods. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/dirty.rb:310 def attribute_previously_changed?(attr_name, **options); end @@ -2298,8 +2084,6 @@ module ActiveModel::Dirty # person.name = 'bob' # person.changed? # => true # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/dirty.rb:286 def changed?; end @@ -2426,14 +2210,9 @@ class ActiveModel::EachValidator < ::ActiveModel::Validator # +options+ reader, however the :attributes option will be removed # and instead be made available through the +attributes+ reader. # - # @raise [ArgumentError] - # @return [EachValidator] a new instance of EachValidator - # # pkg:gem/activemodel#lib/active_model/validator.rb:140 def initialize(options); end - # Returns the value of attribute attributes. - # # pkg:gem/activemodel#lib/active_model/validator.rb:135 def attributes; end @@ -2454,8 +2233,6 @@ class ActiveModel::EachValidator < ::ActiveModel::Validator # Override this method in subclasses with the validation logic, adding # errors to the records +errors+ array where necessary. # - # @raise [NotImplementedError] - # # pkg:gem/activemodel#lib/active_model/validator.rb:161 def validate_each(record, attribute, value); end @@ -2471,8 +2248,6 @@ end # # pkg:gem/activemodel#lib/active_model/error.rb:8 class ActiveModel::Error - # @return [Error] a new instance of Error - # # pkg:gem/activemodel#lib/active_model/error.rb:102 def initialize(base, attribute, type = T.unsafe(nil), **options); end @@ -2489,12 +2264,6 @@ class ActiveModel::Error # pkg:gem/activemodel#lib/active_model/error.rb:118 def base; end - # Returns the error details. - # - # error = ActiveModel::Error.new(person, :name, :too_short, count: 5) - # error.details - # # => { error: :too_short, count: 5 } - # # pkg:gem/activemodel#lib/active_model/error.rb:151 def detail; end @@ -2538,8 +2307,6 @@ class ActiveModel::Error # # Omitted params are not checked for a match. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/error.rb:165 def match?(attribute, type = T.unsafe(nil), **options); end @@ -2568,8 +2335,6 @@ class ActiveModel::Error # All params must be equal to Error's own attributes to be considered a # strict match. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/error.rb:183 def strict_match?(attribute, type, **options); end @@ -2683,8 +2448,6 @@ class ActiveModel::Errors # end # end # - # @return [Errors] a new instance of Errors - # # pkg:gem/activemodel#lib/active_model/errors.rb:114 def initialize(base); end @@ -2767,8 +2530,6 @@ class ActiveModel::Errors # person.errors.added? :name, :too_long # => false # person.errors.added? :name, "is too long" # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/errors.rb:369 def added?(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end @@ -2821,12 +2582,6 @@ class ActiveModel::Errors # pkg:gem/activemodel#lib/active_model/errors.rb:273 def details; end - # :method: size - # - # :call-seq: size - # - # Returns number of errors. - # # pkg:gem/activemodel#lib/active_model/errors.rb:100 def each(*_arg0, **_arg1, &_arg2); end @@ -2910,15 +2665,6 @@ class ActiveModel::Errors # pkg:gem/activemodel#lib/active_model/errors.rb:286 def group_by_attribute; end - # Returns +true+ if the error messages include an error for the given key - # +attribute+, +false+ otherwise. - # - # person.errors.messages # => {:name=>["cannot be nil"]} - # person.errors.include?(:name) # => true - # person.errors.include?(:age) # => false - # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/errors.rb:204 def has_key?(attribute); end @@ -2942,23 +2688,12 @@ class ActiveModel::Errors # person.errors.include?(:name) # => true # person.errors.include?(:age) # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/errors.rb:199 def include?(attribute); end # pkg:gem/activemodel#lib/active_model/errors.rb:480 def inspect; end - # Returns +true+ if the error messages include an error for the given key - # +attribute+, +false+ otherwise. - # - # person.errors.messages # => {:name=>["cannot be nil"]} - # person.errors.include?(:name) # => true - # person.errors.include?(:age) # => false - # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/errors.rb:205 def key?(attribute); end @@ -2995,9 +2730,6 @@ class ActiveModel::Errors # pkg:gem/activemodel#lib/active_model/errors.rb:441 def messages_for(attribute); end - # The actual array of +Error+ objects - # This method is aliased to objects. - # # pkg:gem/activemodel#lib/active_model/errors.rb:105 def objects; end @@ -3013,25 +2745,12 @@ class ActiveModel::Errors # person.errors.of_kind? :name, :not_too_long # => false # person.errors.of_kind? :name, "is too long" # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/errors.rb:392 def of_kind?(attribute, type = T.unsafe(nil)); end # pkg:gem/activemodel#lib/active_model/errors.rb:100 def size(*_arg0, **_arg1, &_arg2); end - # Returns all the full error messages in an array. - # - # class Person - # validates_presence_of :name, :address, :email - # validates_length_of :name, in: 5..30 - # end - # - # person = Person.create(address: '123 First St.') - # person.errors.full_messages - # # => ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Email can't be blank"] - # # pkg:gem/activemodel#lib/active_model/errors.rb:415 def to_a; end @@ -3101,16 +2820,12 @@ end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:91 class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTracker - # @return [ForcedMutationTracker] a new instance of ForcedMutationTracker - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:92 def initialize(attributes); end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:101 def change_to_attribute(attr_name); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:97 def changed_in_place?(attr_name); end @@ -3131,8 +2846,6 @@ class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTrack # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:132 def attr_names; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:136 def attribute_changed?(attr_name); end @@ -3142,8 +2855,6 @@ class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTrack # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:140 def fetch_value(attr_name); end - # Returns the value of attribute finalized_changes. - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:130 def finalized_changes; end @@ -3153,8 +2864,6 @@ end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:94 class ActiveModel::LazyAttributeHash - # @return [LazyAttributeHash] a new instance of LazyAttributeHash - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:97 def initialize(types, values, additional_types, default_attributes, delegate_hash = T.unsafe(nil)); end @@ -3182,8 +2891,6 @@ class ActiveModel::LazyAttributeHash # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:95 def fetch(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:106 def key?(key); end @@ -3203,50 +2910,36 @@ class ActiveModel::LazyAttributeHash private - # Returns the value of attribute additional_types. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:163 def additional_types; end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:165 def assign_default_value(name); end - # Returns the value of attribute default_attributes. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:163 def default_attributes; end - # Returns the value of attribute delegate_hash. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:163 def delegate_hash; end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:124 def initialize_dup(_); end - # Returns the value of attribute types. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:163 def types; end - # Returns the value of attribute values. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:163 def values; end end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:21 class ActiveModel::LazyAttributeSet < ::ActiveModel::AttributeSet - # @return [LazyAttributeSet] a new instance of LazyAttributeSet - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:22 def initialize(values, types, additional_types, default_attributes, attributes = T.unsafe(nil)); end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:41 def fetch_value(name, &block); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:32 def key?(name); end @@ -3260,26 +2953,18 @@ class ActiveModel::LazyAttributeSet < ::ActiveModel::AttributeSet private - # Returns the value of attribute additional_types. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:71 def additional_types; end # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:73 def default_attribute(name, value_present = T.unsafe(nil), value = T.unsafe(nil)); end - # Returns the value of attribute default_attributes. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:71 def default_attributes; end - # Returns the value of attribute types. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:71 def types; end - # Returns the value of attribute values. - # # pkg:gem/activemodel#lib/active_model/attribute_set/builder.rb:71 def values; end end @@ -3340,8 +3025,6 @@ module ActiveModel::Lint::Tests # will route to the create action. If it is persisted, a form for the # object will route to the update action. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/lint.rb:70 def test_persisted?; end @@ -3497,9 +3180,6 @@ class ActiveModel::Name # ActiveModel::Name.new(Foo::Bar).to_s # # => "Foo::Bar" # - # @raise [ArgumentError] - # @return [Name] a new instance of Name - # # pkg:gem/activemodel#lib/active_model/naming.rb:165 def initialize(klass, namespace = T.unsafe(nil), name = T.unsafe(nil), locale = T.unsafe(nil)); end @@ -3521,32 +3201,18 @@ class ActiveModel::Name # pkg:gem/activemodel#lib/active_model/naming.rb:150 def as_json(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute collection. - # # pkg:gem/activemodel#lib/active_model/naming.rb:15 def cache_key; end - # Returns the value of attribute collection. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def collection; end - # Sets the attribute collection - # - # @param value the value to set the attribute collection to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def collection=(_arg0); end - # Returns the value of attribute element. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def element; end - # Sets the attribute element - # - # @param value the value to set the attribute element to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def element=(_arg0); end @@ -3567,90 +3233,48 @@ class ActiveModel::Name # pkg:gem/activemodel#lib/active_model/naming.rb:196 def human(options = T.unsafe(nil)); end - # Returns the value of attribute i18n_key. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def i18n_key; end - # Sets the attribute i18n_key - # - # @param value the value to set the attribute i18n_key to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def i18n_key=(_arg0); end # pkg:gem/activemodel#lib/active_model/naming.rb:150 def match?(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute name. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def name=(_arg0); end - # Returns the value of attribute param_key. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def param_key; end - # Sets the attribute param_key - # - # @param value the value to set the attribute param_key to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def param_key=(_arg0); end - # Returns the value of attribute plural. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def plural; end - # Sets the attribute plural - # - # @param value the value to set the attribute plural to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def plural=(_arg0); end - # Returns the value of attribute route_key. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def route_key; end - # Sets the attribute route_key - # - # @param value the value to set the attribute route_key to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def route_key=(_arg0); end - # Returns the value of attribute singular. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def singular; end - # Sets the attribute singular - # - # @param value the value to set the attribute singular to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def singular=(_arg0); end - # Returns the value of attribute singular_route_key. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def singular_route_key; end - # Sets the attribute singular_route_key - # - # @param value the value to set the attribute singular_route_key to. - # # pkg:gem/activemodel#lib/active_model/naming.rb:11 def singular_route_key=(_arg0); end @@ -3660,8 +3284,6 @@ class ActiveModel::Name # pkg:gem/activemodel#lib/active_model/naming.rb:150 def to_str(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/naming.rb:208 def uncountable?; end @@ -3787,8 +3409,6 @@ module ActiveModel::Naming # ActiveModel::Naming.uncountable?(Sheep) # => true # ActiveModel::Naming.uncountable?(Post) # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/naming.rb:298 def uncountable?(record_or_class); end @@ -3801,13 +3421,9 @@ end # pkg:gem/activemodel#lib/active_model/nested_error.rb:6 class ActiveModel::NestedError < ::ActiveModel::Error - # @return [NestedError] a new instance of NestedError - # # pkg:gem/activemodel#lib/active_model/nested_error.rb:7 def initialize(base, inner_error, override_options = T.unsafe(nil)); end - # Returns the value of attribute inner_error. - # # pkg:gem/activemodel#lib/active_model/nested_error.rb:16 def inner_error; end @@ -3817,28 +3433,21 @@ end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:156 class ActiveModel::NullMutationTracker - include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:174 def any_changes?; end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:171 def change_to_attribute(attr_name); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:178 def changed?(attr_name, **_arg1); end # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:159 def changed_attribute_names; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/attribute_mutation_tracker.rb:182 def changed_in_place?(attr_name); end @@ -4002,8 +3611,6 @@ ActiveModel::SecurePassword::DEFAULT_RESET_TOKEN_EXPIRES_IN = T.let(T.unsafe(nil # pkg:gem/activemodel#lib/active_model/secure_password.rb:196 class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module - # @return [InstanceMethodsOnActivation] a new instance of InstanceMethodsOnActivation - # # pkg:gem/activemodel#lib/active_model/secure_password.rb:197 def initialize(attribute, reset_token:); end end @@ -4450,8 +4057,6 @@ end # # pkg:gem/activemodel#lib/active_model/type/big_integer.rb:25 class ActiveModel::Type::BigInteger < ::ActiveModel::Type::Integer - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/big_integer.rb:47 def serializable?(value, &_arg1); end @@ -4476,16 +4081,12 @@ end # # pkg:gem/activemodel#lib/active_model/type/binary.rb:11 class ActiveModel::Type::Binary < ::ActiveModel::Type::Value - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/binary.rb:16 def binary?; end # pkg:gem/activemodel#lib/active_model/type/binary.rb:20 def cast(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/binary.rb:35 def changed_in_place?(raw_old_value, value); end @@ -4498,8 +4099,6 @@ end # pkg:gem/activemodel#lib/active_model/type/binary.rb:40 class ActiveModel::Type::Binary::Data - # @return [Data] a new instance of Data - # # pkg:gem/activemodel#lib/active_model/type/binary.rb:41 def initialize(value); end @@ -4647,8 +4246,6 @@ class ActiveModel::Type::DateTime < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods include ::ActiveModel::Type::Helpers::TimeValue - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/date_time.rb:53 def mutable?; end @@ -4793,8 +4390,6 @@ module ActiveModel::Type::Helpers; end # pkg:gem/activemodel#lib/active_model/type/helpers/accepts_multiparameter_time.rb:6 class ActiveModel::Type::Helpers::AcceptsMultiparameterTime < ::Module - # @return [AcceptsMultiparameterTime] a new instance of AcceptsMultiparameterTime - # # pkg:gem/activemodel#lib/active_model/type/helpers/accepts_multiparameter_time.rb:37 def initialize(defaults: T.unsafe(nil)); end end @@ -4813,16 +4408,12 @@ module ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods # pkg:gem/activemodel#lib/active_model/type/helpers/accepts_multiparameter_time.rb:12 def serialize_cast_value(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/accepts_multiparameter_time.rb:32 def value_constructed_by_mass_assignment?(value); end end # pkg:gem/activemodel#lib/active_model/type/helpers/immutable.rb:6 module ActiveModel::Type::Helpers::Immutable - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/immutable.rb:7 def mutable?; end end @@ -4836,13 +4427,9 @@ module ActiveModel::Type::Helpers::Mutable # value (likely a string). +new_value+ will be the current, type # cast value. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/mutable.rb:14 def changed_in_place?(raw_old_value, new_value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/mutable.rb:18 def mutable?; end end @@ -4852,8 +4439,6 @@ module ActiveModel::Type::Helpers::Numeric # pkg:gem/activemodel#lib/active_model/type/helpers/numeric.rb:15 def cast(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/numeric.rb:31 def changed?(old_value, _new_value, new_value_before_type_cast); end @@ -4865,18 +4450,12 @@ module ActiveModel::Type::Helpers::Numeric private - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/numeric.rb:37 def equal_nan?(old_value, new_value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/numeric.rb:49 def non_numeric_string?(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/numeric.rb:44 def number_to_non_number?(old_value, new_value_before_type_cast); end end @@ -4900,6 +4479,7 @@ module ActiveModel::Type::Helpers::TimeValue private + # Early 3.2.x had a bug # BUG: Wrapping the Time object with Time.at because Time.new with `in:` in Ruby 3.2.0 # used to return an invalid Time object # see: https://bugs.ruby-lang.org/issues/19292 @@ -4919,8 +4499,6 @@ module ActiveModel::Type::Helpers::Timezone # pkg:gem/activemodel#lib/active_model/type/helpers/timezone.rb:17 def default_timezone; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/helpers/timezone.rb:9 def is_utc?; end end @@ -4962,8 +4540,6 @@ end class ActiveModel::Type::ImmutableString < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Immutable - # @return [ImmutableString] a new instance of ImmutableString - # # pkg:gem/activemodel#lib/active_model/type/immutable_string.rb:40 def initialize(**args); end @@ -5027,17 +4603,12 @@ class ActiveModel::Type::Integer < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Immutable include ::ActiveModel::Type::Helpers::Numeric - # @return [Integer] a new instance of Integer - # # pkg:gem/activemodel#lib/active_model/type/integer.rb:52 def initialize(**_arg0); end # pkg:gem/activemodel#lib/active_model/type/integer.rb:62 def deserialize(value); end - # @return [Boolean] - # @yield [cast_value] - # # pkg:gem/activemodel#lib/active_model/type/integer.rb:96 def serializable?(value); end @@ -5064,8 +4635,6 @@ class ActiveModel::Type::Integer < ::ActiveModel::Type::Value # pkg:gem/activemodel#lib/active_model/type/integer.rb:116 def min_value; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/integer.rb:104 def out_of_range?(value); end end @@ -5078,8 +4647,6 @@ ActiveModel::Type::Integer::DEFAULT_LIMIT = T.let(T.unsafe(nil), Integer) # pkg:gem/activemodel#lib/active_model/type/registry.rb:5 class ActiveModel::Type::Registry - # @return [Registry] a new instance of Registry - # # pkg:gem/activemodel#lib/active_model/type/registry.rb:6 def initialize; end @@ -5094,8 +4661,6 @@ class ActiveModel::Type::Registry # pkg:gem/activemodel#lib/active_model/type/registry.rb:10 def initialize_copy(other); end - # Returns the value of attribute registrations. - # # pkg:gem/activemodel#lib/active_model/type/registry.rb:34 def registrations; end end @@ -5114,8 +4679,6 @@ module ActiveModel::Type::SerializeCastValue def itself_if_serialize_cast_value_compatible; end class << self - # @private - # # pkg:gem/activemodel#lib/active_model/type/serialize_cast_value.rb:21 def included(klass); end @@ -5126,8 +4689,6 @@ end # pkg:gem/activemodel#lib/active_model/type/serialize_cast_value.rb:8 module ActiveModel::Type::SerializeCastValue::ClassMethods - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/serialize_cast_value.rb:9 def serialize_cast_value_compatible?; end end @@ -5149,13 +4710,9 @@ end # # pkg:gem/activemodel#lib/active_model/type/string.rb:15 class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/string.rb:16 def changed_in_place?(raw_old_value, new_value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/string.rb:22 def mutable?; end @@ -5236,16 +4793,12 @@ class ActiveModel::Type::Value # these settings. It uses them for equality comparison and hash key # generation only. # - # @return [Value] a new instance of Value - # # pkg:gem/activemodel#lib/active_model/type/value.rb:17 def initialize(precision: T.unsafe(nil), limit: T.unsafe(nil), scale: T.unsafe(nil)); end # pkg:gem/activemodel#lib/active_model/type/value.rb:121 def ==(other); end - # @raise [NoMethodError] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:144 def as_json(*_arg0); end @@ -5255,8 +4808,6 @@ class ActiveModel::Type::Value # These predicates are not documented, as I need to look further into # their use, and see if they can be removed entirely. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:77 def binary?; end @@ -5278,8 +4829,6 @@ class ActiveModel::Type::Value # and +new_value+ will always be type-cast. Types should not need to # override this method. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:84 def changed?(old_value, new_value, _new_value_before_type_cast); end @@ -5301,8 +4850,6 @@ class ActiveModel::Type::Value # # +new_value+ The current value, after type casting. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:105 def changed_in_place?(raw_old_value, new_value); end @@ -5319,34 +4866,24 @@ class ActiveModel::Type::Value # pkg:gem/activemodel#lib/active_model/type/value.rb:127 def eql?(other); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:113 def force_equality?(_value); end # pkg:gem/activemodel#lib/active_model/type/value.rb:129 def hash; end - # Returns the value of attribute limit. - # # pkg:gem/activemodel#lib/active_model/type/value.rb:11 def limit; end # pkg:gem/activemodel#lib/active_model/type/value.rb:117 def map(value, &_arg1); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:140 def mutable?; end - # Returns the value of attribute precision. - # # pkg:gem/activemodel#lib/active_model/type/value.rb:11 def precision; end - # Returns the value of attribute scale. - # # pkg:gem/activemodel#lib/active_model/type/value.rb:11 def scale; end @@ -5355,8 +4892,6 @@ class ActiveModel::Type::Value # value parameter is a Ruby boolean, but may return +false+ if the value # parameter is some other object. # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:28 def serializable?(value, &_arg1); end @@ -5368,8 +4903,6 @@ class ActiveModel::Type::Value # pkg:gem/activemodel#lib/active_model/type/value.rb:65 def serialize(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:136 def serialized?; end @@ -5385,8 +4918,6 @@ class ActiveModel::Type::Value # pkg:gem/activemodel#lib/active_model/type/value.rb:71 def type_cast_for_schema(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/type/value.rb:109 def value_constructed_by_mass_assignment?(_value); end @@ -5415,18 +4946,12 @@ end # # pkg:gem/activemodel#lib/active_model/errors.rb:535 class ActiveModel::UnknownAttributeError < ::NoMethodError - # @return [UnknownAttributeError] a new instance of UnknownAttributeError - # # pkg:gem/activemodel#lib/active_model/errors.rb:538 def initialize(record, attribute); end - # Returns the value of attribute attribute. - # # pkg:gem/activemodel#lib/active_model/errors.rb:536 def attribute; end - # Returns the value of attribute record. - # # pkg:gem/activemodel#lib/active_model/errors.rb:536 def record; end end @@ -5451,15 +4976,9 @@ ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer) # pkg:gem/activemodel#lib/active_model/validations.rb:491 class ActiveModel::ValidationContext - # Returns the value of attribute context. - # # pkg:gem/activemodel#lib/active_model/validations.rb:492 def context; end - # Sets the attribute context - # - # @param value the value to set the attribute context to. - # # pkg:gem/activemodel#lib/active_model/validations.rb:492 def context=(_arg0); end end @@ -5477,13 +4996,9 @@ end # # pkg:gem/activemodel#lib/active_model/validations.rb:481 class ActiveModel::ValidationError < ::StandardError - # @return [ValidationError] a new instance of ValidationError - # # pkg:gem/activemodel#lib/active_model/validations.rb:484 def initialize(model); end - # Returns the value of attribute model. - # # pkg:gem/activemodel#lib/active_model/validations.rb:482 def model; end end @@ -5585,8 +5100,6 @@ module ActiveModel::Validations # person.invalid? # => false # person.invalid?(:new) # => true # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations.rb:410 def invalid?(context = T.unsafe(nil)); end @@ -5640,43 +5153,9 @@ module ActiveModel::Validations # person.valid? # => true # person.valid?(:new) # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations.rb:363 def valid?(context = T.unsafe(nil)); end - # Runs all the specified validations and returns +true+ if no errors were - # added otherwise +false+. - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name - # end - # - # person = Person.new - # person.name = '' - # person.valid? # => false - # person.name = 'david' - # person.valid? # => true - # - # Context can optionally be supplied to define which callbacks to test - # against (the context is defined on the validations using :on). - # - # class Person - # include ActiveModel::Validations - # - # attr_accessor :name - # validates_presence_of :name, on: :new - # end - # - # person = Person.new - # person.valid? # => true - # person.valid?(:new) # => false - # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations.rb:372 def validate(context = T.unsafe(nil)); end @@ -5747,8 +5226,6 @@ module ActiveModel::Validations # pkg:gem/activemodel#lib/active_model/validations.rb:312 def initialize_dup(other); end - # @raise [ValidationError] - # # pkg:gem/activemodel#lib/active_model/validations.rb:466 def raise_validation_error; end @@ -5783,8 +5260,6 @@ end # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:5 class ActiveModel::Validations::AcceptanceValidator < ::ActiveModel::EachValidator - # @return [AcceptanceValidator] a new instance of AcceptanceValidator - # # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:6 def initialize(options); end @@ -5793,8 +5268,6 @@ class ActiveModel::Validations::AcceptanceValidator < ::ActiveModel::EachValidat private - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:23 def acceptable_option?(value); end @@ -5804,8 +5277,6 @@ end # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:27 class ActiveModel::Validations::AcceptanceValidator::LazilyDefineAttributes < ::Module - # @return [LazilyDefineAttributes] a new instance of LazilyDefineAttributes - # # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:28 def initialize(attributes); end @@ -5818,15 +5289,11 @@ class ActiveModel::Validations::AcceptanceValidator::LazilyDefineAttributes < :: # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:32 def included(klass); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:51 def matches?(method_name); end protected - # Returns the value of attribute attributes. - # # pkg:gem/activemodel#lib/active_model/validations/acceptance.rb:78 def attributes; end end @@ -5953,8 +5420,6 @@ module ActiveModel::Validations::ClassMethods # User.attribute_method?(:name) # => true # User.attribute_method?(:age) # => false # - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations.rb:284 def attribute_method?(attribute); end @@ -6178,8 +5643,6 @@ module ActiveModel::Validations::ClassMethods # # validates :password, presence: { if: :password_required?, message: 'is forgotten.' }, confirmation: true # - # @raise [ArgumentError] - # # pkg:gem/activemodel#lib/active_model/validations/validates.rb:111 def validates(*attributes); end @@ -6386,8 +5849,6 @@ module ActiveModel::Validations::Clusivity # pkg:gem/activemodel#lib/active_model/validations/clusivity.rb:31 def delimiter; end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/clusivity.rb:21 def include?(record, value); end @@ -6427,8 +5888,6 @@ end # pkg:gem/activemodel#lib/active_model/validations/confirmation.rb:5 class ActiveModel::Validations::ConfirmationValidator < ::ActiveModel::EachValidator - # @return [ConfirmationValidator] a new instance of ConfirmationValidator - # # pkg:gem/activemodel#lib/active_model/validations/confirmation.rb:6 def initialize(options); end @@ -6437,8 +5896,6 @@ class ActiveModel::Validations::ConfirmationValidator < ::ActiveModel::EachValid private - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/confirmation.rb:31 def confirmation_value_equal?(record, attribute, value, confirmed); end @@ -6473,8 +5930,6 @@ class ActiveModel::Validations::FormatValidator < ::ActiveModel::EachValidator # pkg:gem/activemodel#lib/active_model/validations/format.rb:30 def record_error(record, attribute, name, value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/format.rb:48 def regexp_using_multiline_anchors?(regexp); end end @@ -6882,55 +6337,6 @@ module ActiveModel::Validations::HelperMethods # pkg:gem/activemodel#lib/active_model/validations/presence.rb:34 def validates_presence_of(*attr_names); end - # Validates that the specified attributes match the length restrictions - # supplied. Only one constraint option can be used at a time apart from - # +:minimum+ and +:maximum+ that can be combined together: - # - # class Person < ActiveRecord::Base - # validates_length_of :first_name, maximum: 30 - # validates_length_of :last_name, maximum: 30, message: "less than 30 if you don't mind" - # validates_length_of :fax, in: 7..32, allow_nil: true - # validates_length_of :phone, in: 7..32, allow_blank: true - # validates_length_of :user_name, within: 6..20, too_long: 'pick a shorter name', too_short: 'pick a longer name' - # validates_length_of :zip_code, minimum: 5, too_short: 'please enter at least 5 characters' - # validates_length_of :smurf_leader, is: 4, message: "papa is spelled with 4 characters... don't play me." - # validates_length_of :words_in_essay, minimum: 100, too_short: 'Your essay must be at least 100 words.' - # - # private - # def words_in_essay - # essay.scan(/\w+/) - # end - # end - # - # Constraint options: - # - # * :minimum - The minimum size of the attribute. - # * :maximum - The maximum size of the attribute. Allows +nil+ by - # default if not used with +:minimum+. - # * :is - The exact size of the attribute. - # * :within - A range specifying the minimum and maximum size of - # the attribute. - # * :in - A synonym (or alias) for :within. - # - # Other options: - # - # * :allow_nil - Attribute may be +nil+; skip validation. - # * :allow_blank - Attribute may be blank; skip validation. - # * :too_long - The error message if the attribute goes over the - # maximum (default is: "is too long (maximum is %{count} characters)"). - # * :too_short - The error message if the attribute goes under the - # minimum (default is: "is too short (minimum is %{count} characters)"). - # * :wrong_length - The error message if using the :is - # method and the attribute is the wrong size (default is: "is the wrong - # length (should be %{count} characters)"). - # * :message - The error message to use for a :minimum, - # :maximum, or :is violation. An alias of the appropriate - # too_long/too_short/wrong_length message. - # - # There is also a list of default options supported by every validator: - # +:if+, +:unless+, +:on+, and +:strict+. - # See ActiveModel::Validations::ClassMethods#validates for more information. - # # pkg:gem/activemodel#lib/active_model/validations/length.rb:127 def validates_size_of(*attr_names); end @@ -6953,8 +6359,6 @@ end class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator include ::ActiveModel::Validations::ResolveValue - # @return [LengthValidator] a new instance of LengthValidator - # # pkg:gem/activemodel#lib/active_model/validations/length.rb:15 def initialize(options); end @@ -6966,8 +6370,6 @@ class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator private - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/length.rb:69 def skip_nil_check?(key); end end @@ -6994,26 +6396,18 @@ class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValid private - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:118 def allow_only_integer?(record); end # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:112 def filtered_options(value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:108 def is_hexadecimal_literal?(raw_value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:104 def is_integer?(raw_value); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:94 def is_number?(raw_value, precision, scale); end @@ -7029,8 +6423,6 @@ class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValid # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:122 def prepare_value_for_validation(value, record, attr_name); end - # @return [Boolean] - # # pkg:gem/activemodel#lib/active_model/validations/numericality.rb:143 def record_attribute_changed_in_place?(record, attr_name); end @@ -7166,8 +6558,6 @@ end class ActiveModel::Validator # Accepts options that will be made available through the +options+ reader. # - # @return [Validator] a new instance of Validator - # # pkg:gem/activemodel#lib/active_model/validator.rb:108 def initialize(options = T.unsafe(nil)); end @@ -7179,16 +6569,12 @@ class ActiveModel::Validator # pkg:gem/activemodel#lib/active_model/validator.rb:116 def kind; end - # Returns the value of attribute options. - # # pkg:gem/activemodel#lib/active_model/validator.rb:97 def options; end # Override this method in subclasses with validation logic, adding errors # to the records +errors+ array where necessary. # - # @raise [NotImplementedError] - # # pkg:gem/activemodel#lib/active_model/validator.rb:122 def validate(record); end diff --git a/sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi b/sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi index e45a2b5ca..7ba500fa2 100644 --- a/sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi +++ b/sorbet/rbi/gems/activerecord-typedstore@1.6.0.rbi @@ -17,8 +17,6 @@ module ActiveRecord::TypedStore::Behavior mixes_in_class_methods ::ActiveRecord::TypedStore::Behavior::ClassMethods - # @return [Boolean] - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/behavior.rb:56 def attribute?(attr_name); end @@ -57,10 +55,6 @@ end # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/dsl.rb:6 class ActiveRecord::TypedStore::DSL - # @return [DSL] a new instance of DSL - # @yield [_self] - # @yieldparam _self [ActiveRecord::TypedStore::DSL] the object that the method was called on - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/dsl.rb:9 def initialize(store_name, options); end @@ -73,8 +67,6 @@ class ActiveRecord::TypedStore::DSL # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/dsl.rb:65 def boolean(name, **options); end - # Returns the value of attribute coder. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/dsl.rb:7 def coder; end @@ -93,8 +85,6 @@ class ActiveRecord::TypedStore::DSL # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/dsl.rb:50 def default_coder(attribute_name); end - # Returns the value of attribute fields. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/dsl.rb:7 def fields; end @@ -133,56 +123,36 @@ end # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:4 class ActiveRecord::TypedStore::Field - # @return [Field] a new instance of Field - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:7 def initialize(name, type, options = T.unsafe(nil)); end - # Returns the value of attribute accessor. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def accessor; end - # Returns the value of attribute array. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def array; end - # Returns the value of attribute blank. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def blank; end # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:26 def cast(value); end - # Returns the value of attribute default. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def default; end - # @return [Boolean] - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:22 def has_default?; end - # Returns the value of attribute name. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def name; end - # Returns the value of attribute null. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def null; end - # Returns the value of attribute type. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def type; end - # Returns the value of attribute type_sym. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/field.rb:5 def type_sym; end @@ -214,18 +184,12 @@ end # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/type.rb:4 class ActiveRecord::TypedStore::Type < ::ActiveRecord::Type::Serialized - # @return [Type] a new instance of Type - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/type.rb:5 def initialize(typed_hash_klass, coder, subtype); end - # @return [Boolean] - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/type.rb:42 def changed_in_place?(raw_old_value, value); end - # @return [Boolean] - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/type.rb:38 def default_value?(value); end @@ -250,8 +214,6 @@ end # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/typed_hash.rb:4 class ActiveRecord::TypedStore::TypedHash < ::ActiveSupport::HashWithIndifferentAccess - # @return [TypedHash] a new instance of TypedHash - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/typed_hash.rb:23 def initialize(constructor = T.unsafe(nil)); end @@ -297,8 +259,6 @@ class ActiveRecord::TypedStore::TypedHash < ::ActiveSupport::HashWithIndifferent # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/typed_hash.rb:15 def defaults_hash; end - # Returns the value of attribute fields. - # # pkg:gem/activerecord-typedstore#lib/active_record/typed_store/typed_hash.rb:7 def fields; end end diff --git a/sorbet/rbi/gems/activerecord@8.1.2.rbi b/sorbet/rbi/gems/activerecord@8.1.2.rbi index 1638ef4f8..747cf6340 100644 --- a/sorbet/rbi/gems/activerecord@8.1.2.rbi +++ b/sorbet/rbi/gems/activerecord@8.1.2.rbi @@ -21,6 +21,10 @@ class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString; end class ActiveModel::Type::Value; end # :include: ../README.rdoc +# Validation error class to wrap association records' errors, +# with index_errors support. +# :enddoc: +# :markup: markdown # # pkg:gem/activerecord#lib/active_record/gem_version.rb:3 module ActiveRecord @@ -114,8 +118,6 @@ module ActiveRecord # pkg:gem/activerecord#lib/active_record.rb:495 def deprecated_associations_options; end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record.rb:479 def deprecated_associations_options=(options); end @@ -274,8 +276,6 @@ module ActiveRecord # # ActiveRecord.schema_cache_ignored_table?(:developers) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record.rb:207 def schema_cache_ignored_table?(table_name); end @@ -362,13 +362,9 @@ class ActiveRecord::ActiveRecordError < ::StandardError; end # # pkg:gem/activerecord#lib/active_record/errors.rb:54 class ActiveRecord::AdapterError < ::ActiveRecord::ActiveRecordError - # @return [AdapterError] a new instance of AdapterError - # # pkg:gem/activerecord#lib/active_record/errors.rb:55 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # Returns the value of attribute connection_pool. - # # pkg:gem/activerecord#lib/active_record/errors.rb:60 def connection_pool; end end @@ -623,8 +619,6 @@ end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:203 class ActiveRecord::AmbiguousSourceReflectionForThroughAssociation < ::ActiveRecord::ActiveRecordError - # @return [AmbiguousSourceReflectionForThroughAssociation] a new instance of AmbiguousSourceReflectionForThroughAssociation - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:204 def initialize(klass, macro, association_name, options, possible_sources); end end @@ -633,29 +627,21 @@ end class ActiveRecord::AssociationNotFoundError < ::ActiveRecord::ConfigurationError include ::DidYouMean::Correctable - # @return [AssociationNotFoundError] a new instance of AssociationNotFoundError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:7 def initialize(record = T.unsafe(nil), association_name = T.unsafe(nil)); end - # Returns the value of attribute association_name. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:5 def association_name; end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:20 def corrections; end - # Returns the value of attribute record. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:5 def record; end end # pkg:gem/activerecord#lib/active_record/association_relation.rb:4 class ActiveRecord::AssociationRelation < ::ActiveRecord::Relation - # @return [AssociationRelation] a new instance of AssociationRelation - # # pkg:gem/activerecord#lib/active_record/association_relation.rb:5 def initialize(klass, association, **_arg2); end @@ -728,8 +714,6 @@ module ActiveRecord::Associations # pkg:gem/activerecord#lib/active_record/associations.rb:53 def association(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations.rb:67 def association_cached?(name); end @@ -769,16 +753,12 @@ end class ActiveRecord::Associations::AliasTracker # table_joins is an array of arel joins which might conflict with the aliases we assign here # - # @return [AliasTracker] a new instance of AliasTracker - # # pkg:gem/activerecord#lib/active_record/associations/alias_tracker.rb:53 def initialize(table_alias_length, aliases); end # pkg:gem/activerecord#lib/active_record/associations/alias_tracker.rb:58 def aliased_table_for(arel_table, table_name = T.unsafe(nil)); end - # Returns the value of attribute aliases. - # # pkg:gem/activerecord#lib/active_record/associations/alias_tracker.rb:80 def aliases; end @@ -832,8 +812,6 @@ end # # pkg:gem/activerecord#lib/active_record/associations/association.rb:35 class ActiveRecord::Associations::Association - # @return [Association] a new instance of Association - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:41 def initialize(owner, reflection); end @@ -843,8 +821,6 @@ class ActiveRecord::Associations::Association # Whether the association represents a single record # or a collection of records. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:237 def collection?; end @@ -854,8 +830,6 @@ class ActiveRecord::Associations::Association # pkg:gem/activerecord#lib/active_record/associations/association.rb:231 def create!(attributes = T.unsafe(nil), &block); end - # Returns the value of attribute disable_joins. - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:37 def disable_joins; end @@ -898,8 +872,6 @@ class ActiveRecord::Associations::Association # Has the \target been already \loaded? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:81 def loaded?; end @@ -920,8 +892,6 @@ class ActiveRecord::Associations::Association # pkg:gem/activerecord#lib/active_record/associations/association.rb:36 def owner=(_arg0); end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:37 def reflection; end @@ -968,8 +938,6 @@ class ActiveRecord::Associations::Association # # Note that if the target has not been loaded, it is not considered stale. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:97 def stale_target?; end @@ -1008,15 +976,11 @@ class ActiveRecord::Associations::Association # pkg:gem/activerecord#lib/active_record/associations/association.rb:248 def find_target(async: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:320 def find_target?; end # Returns true if record contains the foreign_key # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:370 def foreign_key_for?(record); end @@ -1029,13 +993,9 @@ class ActiveRecord::Associations::Association # Currently implemented by belongs_to (vanilla and polymorphic) and # has_one/has_many :through associations which go through a belongs_to. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:332 def foreign_key_present?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:406 def inversable?(record); end @@ -1052,13 +1012,9 @@ class ActiveRecord::Associations::Association # Returns true if inverse association on the given record needs to be set. # This method is redefined by subclasses. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:365 def invertible_for?(record); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:411 def matches_foreign_key?(record); end @@ -1074,8 +1030,6 @@ class ActiveRecord::Associations::Association # Returns true if statement cache should be skipped on the association reader. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:391 def skip_statement_cache?(scope); end @@ -1097,16 +1051,12 @@ class ActiveRecord::Associations::Association # pkg:gem/activerecord#lib/active_record/associations/association.rb:312 def target_scope; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/association.rb:284 def violates_strict_loading?; end end # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:5 class ActiveRecord::Associations::AssociationScope - # @return [AssociationScope] a new instance of AssociationScope - # # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:15 def initialize(value_transformation); end @@ -1139,8 +1089,6 @@ class ActiveRecord::Associations::AssociationScope # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:77 def transform_value(value); end - # Returns the value of attribute value_transformation. - # # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:52 def value_transformation; end @@ -1161,13 +1109,9 @@ ActiveRecord::Associations::AssociationScope::INSTANCE = T.let(T.unsafe(nil), Ac # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:101 class ActiveRecord::Associations::AssociationScope::ReflectionProxy < ::SimpleDelegator - # @return [ReflectionProxy] a new instance of ReflectionProxy - # # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:104 def initialize(reflection, aliased_table); end - # Returns the value of attribute aliased_table. - # # pkg:gem/activerecord#lib/active_record/associations/association_scope.rb:102 def aliased_table; end @@ -1200,40 +1144,26 @@ class ActiveRecord::Associations::BelongsToAssociation < ::ActiveRecord::Associa # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:50 def reset; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:90 def saved_change_to_target?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:82 def target_changed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:86 def target_previously_changed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:55 def updated?; end private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:124 def find_target?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:157 def foreign_key_present?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:161 def invertible_for?(record); end @@ -1246,8 +1176,6 @@ class ActiveRecord::Associations::BelongsToAssociation < ::ActiveRecord::Associa # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:132 def replace_keys(record, force: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_association.rb:128 def require_counter_update?; end @@ -1268,18 +1196,12 @@ class ActiveRecord::Associations::BelongsToPolymorphicAssociation < ::ActiveReco # pkg:gem/activerecord#lib/active_record/associations/belongs_to_polymorphic_association.rb:7 def klass; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_polymorphic_association.rb:20 def saved_change_to_target?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_polymorphic_association.rb:12 def target_changed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/belongs_to_polymorphic_association.rb:16 def target_previously_changed?; end @@ -1298,6 +1220,18 @@ class ActiveRecord::Associations::BelongsToPolymorphicAssociation < ::ActiveReco def stale_state; end end +# This is the parent Association class which defines the variables +# used by all associations. +# +# The hierarchy is defined as follows: +# Association +# - SingularAssociation +# - BelongsToAssociation +# - HasOneAssociation +# - CollectionAssociation +# - HasManyAssociation +# This class is inherited by the has_one and belongs_to association classes +# # pkg:gem/activerecord#lib/active_record/associations.rb:18 module ActiveRecord::Associations::Builder; end @@ -1307,20 +1241,12 @@ class ActiveRecord::Associations::Builder::Association # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:25 def build(model, name, scope, options, &block); end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:40 def create_reflection(model, name, scope, options, &block); end - # Returns the value of attribute extensions. - # # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:17 def extensions; end - # Sets the attribute extensions - # - # @param value the value to set the attribute extensions to. - # # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:17 def extensions=(_arg0); end @@ -1366,13 +1292,9 @@ class ActiveRecord::Associations::Builder::Association # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:112 def define_writers(mixin, name); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:61 def macro; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/associations/builder/association.rb:130 def valid_dependent_options; end @@ -1459,26 +1381,18 @@ ActiveRecord::Associations::Builder::CollectionAssociation::CALLBACKS = T.let(T. # pkg:gem/activerecord#lib/active_record/associations/builder/has_and_belongs_to_many.rb:4 class ActiveRecord::Associations::Builder::HasAndBelongsToMany - # @return [HasAndBelongsToMany] a new instance of HasAndBelongsToMany - # # pkg:gem/activerecord#lib/active_record/associations/builder/has_and_belongs_to_many.rb:7 def initialize(association_name, lhs_model, options); end - # Returns the value of attribute association_name. - # # pkg:gem/activerecord#lib/active_record/associations/builder/has_and_belongs_to_many.rb:5 def association_name; end - # Returns the value of attribute lhs_model. - # # pkg:gem/activerecord#lib/active_record/associations/builder/has_and_belongs_to_many.rb:5 def lhs_model; end # pkg:gem/activerecord#lib/active_record/associations/builder/has_and_belongs_to_many.rb:59 def middle_reflection(join_model); end - # Returns the value of attribute options. - # # pkg:gem/activerecord#lib/active_record/associations/builder/has_and_belongs_to_many.rb:5 def options; end @@ -3509,8 +3423,6 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:117 def build(attributes = T.unsafe(nil), &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:316 def collection?; end @@ -3573,16 +3485,12 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # loaded and you are going to fetch the records anyway it is better to # check collection.length.zero?. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:232 def empty?; end # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:94 def find(*args); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:308 def find_from_target?; end @@ -3596,8 +3504,6 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:62 def ids_writer(ids); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:258 def include?(record); end @@ -3610,8 +3516,6 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:31 def nested_attributes_target=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:304 def null_scope?; end @@ -3665,8 +3569,6 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:498 def callbacks_for(callback_name); end - # @raise [ActiveRecord::Rollback] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:438 def concat_records(records, raise = T.unsafe(nil)); end @@ -3677,8 +3579,6 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # using one of the methods +:destroy+, +:delete_all+ # or +:nullify+ (or +nil+, in which case a default is used). # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:414 def delete_records(records, method); end @@ -3688,8 +3588,6 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:521 def find_by_scan(*args); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_association.rb:507 def include_in_memory?(record); end @@ -3757,8 +3655,6 @@ end # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:31 class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation - # @return [CollectionProxy] a new instance of CollectionProxy - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:32 def initialize(klass, association, **_arg2); end @@ -3842,28 +3738,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1155 def annotate_values=(arg); end - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1053 def append(*records); end @@ -3913,28 +3787,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1066 def clear; end - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1054 def concat(*records); end @@ -4343,8 +4195,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.count # => 0 # person.pets.empty? # => true # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:831 def empty?; end @@ -4455,8 +4305,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.include?(Pet.find(20)) # => true # person.pets.include?(Pet.find(21)) # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:927 def include?(record); end @@ -4568,14 +4416,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:44 def load_target; end - # Returns +true+ if the association has been loaded, otherwise +false+. - # - # person.pets.loaded? # => false - # person.pets.records - # person.pets.loaded? # => true - # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:56 def loaded; end @@ -4585,8 +4425,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.records # person.pets.loaded? # => true # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:53 def loaded?; end @@ -4608,31 +4446,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1155 def merge!(*_arg0, **_arg1, &_arg2); end - # Returns a new object of the collection type that has been instantiated - # with +attributes+ and linked to this object, but have not yet been saved. - # You can pass an array of attributes hashes, this will return an array - # with the new objects. - # - # class Person - # has_many :pets - # end - # - # person.pets.build - # # => # - # - # person.pets.build(name: 'Fancy-Fancy') - # # => # - # - # person.pets.build([{name: 'Spook'}, {name: 'Choo-Choo'}, {name: 'Brain'}]) - # # => [ - # # #, - # # #, - # # # - # # ] - # - # person.pets.size # => 5 # size of the collection - # person.pets.count # => 0 # count from database - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:321 def new(attributes = T.unsafe(nil), &block); end @@ -4705,8 +4518,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1155 def preload_values=(arg); end - # @raise [NoMethodError] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1056 def prepend(*args); end @@ -4730,28 +4541,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:944 def proxy_association; end - # Adds one or more +records+ to the collection by setting their foreign keys - # to the association's primary key. Since << flattens its argument list and - # inserts each record, +push+ and +concat+ behave identically. Returns +self+ - # so several appends may be chained together. - # - # class Person < ActiveRecord::Base - # has_many :pets - # end - # - # person.pets.size # => 0 - # person.pets << Pet.new(name: 'Fancy-Fancy') - # person.pets << [Pet.new(name: 'Spook'), Pet.new(name: 'Choo-Choo')] - # person.pets.size # => 3 - # - # person.id # => 1 - # person.pets - # # => [ - # # #, - # # #, - # # # - # # ] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1052 def push(*records); end @@ -5093,8 +4882,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1176 def exec_queries; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1172 def find_from_target?; end @@ -5104,8 +4891,6 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1158 def find_nth_with_limit(index, limit); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/collection_proxy.rb:1168 def null_scope?; end end @@ -5113,8 +4898,6 @@ end # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:6 module ActiveRecord::Associations::Deprecation class << self - # Returns the value of attribute backtrace. - # # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:14 def backtrace; end @@ -5124,13 +4907,9 @@ module ActiveRecord::Associations::Deprecation # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:28 def guard(reflection); end - # Returns the value of attribute mode. - # # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:14 def mode; end - # private setter - # # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:16 def mode=(value); end @@ -5148,8 +4927,6 @@ module ActiveRecord::Associations::Deprecation # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:73 def clean_locations; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/deprecation.rb:77 def set_backtrace_supports_array_of_locations?; end @@ -5180,8 +4957,6 @@ end # pkg:gem/activerecord#lib/active_record/associations/foreign_association.rb:4 module ActiveRecord::Associations::ForeignAssociation - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/foreign_association.rb:5 def foreign_key_present?; end @@ -5271,8 +5046,6 @@ end class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::Associations::HasManyAssociation include ::ActiveRecord::Associations::ThroughAssociation - # @return [HasManyThroughAssociation] a new instance of HasManyThroughAssociation - # # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:9 def initialize(owner, reflection); end @@ -5314,8 +5087,6 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:193 def distribution(array); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:225 def find_target(async: T.unsafe(nil)); end @@ -5324,8 +5095,6 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As # NOTE - not sure that we can actually cope with inverses here # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:233 def invertible_for?(record); end @@ -5338,24 +5107,18 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:81 def save_through_record(record); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:121 def target_reflection_has_associated_record?; end # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:199 def through_records_for(record); end - # Returns the value of attribute through_scope. - # # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:69 def through_scope; end # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:71 def through_scope_attributes; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/has_many_through_association.rb:125 def update_through_counter?(method); end end @@ -5417,8 +5180,6 @@ end class ActiveRecord::Associations::JoinDependency extend ::ActiveSupport::Autoload - # @return [JoinDependency] a new instance of JoinDependency - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:71 def initialize(base, table, associations, join_type); end @@ -5442,20 +5203,14 @@ class ActiveRecord::Associations::JoinDependency protected - # Returns the value of attribute join_root. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:163 def join_root; end - # Returns the value of attribute join_type. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:163 def join_type; end private - # Returns the value of attribute alias_tracker. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:166 def alias_tracker; end @@ -5474,8 +5229,6 @@ class ActiveRecord::Associations::JoinDependency # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:223 def find_reflection(klass, name); end - # Returns the value of attribute join_root_alias. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:166 def join_root_alias; end @@ -5499,8 +5252,6 @@ end # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:13 class ActiveRecord::Associations::JoinDependency::Aliases - # @return [Aliases] a new instance of Aliases - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:14 def initialize(tables); end @@ -5516,33 +5267,15 @@ end # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:44 class ActiveRecord::Associations::JoinDependency::Aliases::Column < ::Struct - # Returns the value of attribute alias - # - # @return [Object] the current value of alias - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:44 def alias; end - # Sets the attribute alias - # - # @param value [Object] the value to set the attribute alias to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:44 def alias=(_); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:44 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:44 def name=(_); end @@ -5569,33 +5302,15 @@ class ActiveRecord::Associations::JoinDependency::Aliases::Table < ::Struct # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:39 def column_aliases; end - # Returns the value of attribute columns - # - # @return [Object] the current value of columns - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:38 def columns; end - # Sets the attribute columns - # - # @param value [Object] the value to set the attribute columns to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:38 def columns=(_); end - # Returns the value of attribute node - # - # @return [Object] the current value of node - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:38 def node; end - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency.rb:38 def node=(_); end @@ -5619,48 +5334,30 @@ end # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:9 class ActiveRecord::Associations::JoinDependency::JoinAssociation < ::ActiveRecord::Associations::JoinDependency::JoinPart - # @return [JoinAssociation] a new instance of JoinAssociation - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:13 def initialize(reflection, children); end # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:24 def join_constraints(foreign_table, foreign_klass, join_type, alias_tracker); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:19 def match?(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:79 def readonly?; end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:10 def reflection; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:85 def strict_loading?; end - # Returns the value of attribute table. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:11 def table; end - # Sets the attribute table - # - # @param value the value to set the attribute table to. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:11 def table=(_arg0); end - # Returns the value of attribute tables. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_association.rb:10 def tables; end @@ -5672,18 +5369,12 @@ end # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_base.rb:8 class ActiveRecord::Associations::JoinDependency::JoinBase < ::ActiveRecord::Associations::JoinDependency::JoinPart - # @return [JoinBase] a new instance of JoinBase - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_base.rb:11 def initialize(base_klass, table, children); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_base.rb:16 def match?(other); end - # Returns the value of attribute table. - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_base.rb:9 def table; end end @@ -5699,8 +5390,6 @@ end class ActiveRecord::Associations::JoinDependency::JoinPart include ::Enumerable - # @return [JoinPart] a new instance of JoinPart - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_part.rb:22 def initialize(base_klass, children); end @@ -5724,9 +5413,6 @@ class ActiveRecord::Associations::JoinDependency::JoinPart # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_part.rb:20 def column_names(*_arg0, **_arg1, &_arg2); end - # @yield [_self] - # @yieldparam _self [ActiveRecord::Associations::JoinDependency::JoinPart] the object that the method was called on - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_part.rb:31 def each(&block); end @@ -5739,8 +5425,6 @@ class ActiveRecord::Associations::JoinDependency::JoinPart # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_part.rb:65 def instantiate(row, aliases, column_types = T.unsafe(nil), &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_part.rb:27 def match?(other); end @@ -5749,8 +5433,6 @@ class ActiveRecord::Associations::JoinDependency::JoinPart # An Arel::Table for the active_record # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/associations/join_dependency/join_part.rb:44 def table; end @@ -5760,15 +5442,11 @@ end # pkg:gem/activerecord#lib/active_record/associations/nested_error.rb:7 class ActiveRecord::Associations::NestedError < ::ActiveModel::NestedError - # @return [NestedError] a new instance of NestedError - # # pkg:gem/activerecord#lib/active_record/associations/nested_error.rb:8 def initialize(association, inner_error); end private - # Returns the value of attribute association. - # # pkg:gem/activerecord#lib/active_record/associations/nested_error.rb:16 def association; end @@ -5871,18 +5549,12 @@ class ActiveRecord::Associations::Preloader # queries by reusing in-memory objects. The optimization is only applied # to single associations (i.e. :belongs_to, :has_one) with no scopes. # - # @return [Preloader] a new instance of Preloader - # # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:99 def initialize(records:, associations:, scope: T.unsafe(nil), available_records: T.unsafe(nil), associate_by_default: T.unsafe(nil)); end - # Returns the value of attribute associate_by_default. - # # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:56 def associate_by_default; end - # Returns the value of attribute associations. - # # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:56 def associations; end @@ -5892,29 +5564,21 @@ class ActiveRecord::Associations::Preloader # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:120 def call; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:116 def empty?; end # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:130 def loaders; end - # Returns the value of attribute records. - # # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:56 def records; end - # Returns the value of attribute scope. - # # pkg:gem/activerecord#lib/active_record/associations/preloader.rb:56 def scope; end end # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:8 class ActiveRecord::Associations::Preloader::Association - # @return [Association] a new instance of Association - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:104 def initialize(klass, owners, reflection, preload_scope, reflection_scope, associate_by_default); end @@ -5929,16 +5593,12 @@ class ActiveRecord::Associations::Preloader::Association # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:119 def future_classes; end - # Returns the value of attribute klass. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:102 def klass; end # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:197 def load_records(raw_records = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:176 def loaded?(owner); end @@ -5957,8 +5617,6 @@ class ActiveRecord::Associations::Preloader::Association # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:135 def run; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:131 def run?; end @@ -5997,13 +5655,9 @@ class ActiveRecord::Associations::Preloader::Association # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:266 def derive_key(owner, key); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:258 def key_conversion_required?; end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:238 def model; end @@ -6015,18 +5669,12 @@ class ActiveRecord::Associations::Preloader::Association # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:286 def owner_key_type; end - # Returns the value of attribute owners. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:238 def owners; end - # Returns the value of attribute preload_scope. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:238 def preload_scope; end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:238 def reflection; end @@ -6036,18 +5684,12 @@ end # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:9 class ActiveRecord::Associations::Preloader::Association::LoaderQuery - # @return [LoaderQuery] a new instance of LoaderQuery - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:12 def initialize(scope, association_key_name); end - # Returns the value of attribute association_key_name. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:10 def association_key_name; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:17 def eql?(other); end @@ -6063,16 +5705,12 @@ class ActiveRecord::Associations::Preloader::Association::LoaderQuery # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:28 def records_for(loaders); end - # Returns the value of attribute scope. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:10 def scope; end end # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:60 class ActiveRecord::Associations::Preloader::Association::LoaderRecords - # @return [LoaderRecords] a new instance of LoaderRecords - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:61 def initialize(loaders, loader_query); end @@ -6084,26 +5722,18 @@ class ActiveRecord::Associations::Preloader::Association::LoaderRecords # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:97 def already_loaded_records; end - # Returns the value of attribute already_loaded_records_by_key. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:75 def already_loaded_records_by_key; end - # Returns the value of attribute keys_to_load. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:75 def keys_to_load; end # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:91 def load_records; end - # Returns the value of attribute loader_query. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:75 def loader_query; end - # Returns the value of attribute loaders. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/association.rb:75 def loaders; end @@ -6113,8 +5743,6 @@ end # pkg:gem/activerecord#lib/active_record/associations/preloader/batch.rb:6 class ActiveRecord::Associations::Preloader::Batch - # @return [Batch] a new instance of Batch - # # pkg:gem/activerecord#lib/active_record/associations/preloader/batch.rb:7 def initialize(preloaders, available_records:); end @@ -6126,36 +5754,24 @@ class ActiveRecord::Associations::Preloader::Batch # pkg:gem/activerecord#lib/active_record/associations/preloader/batch.rb:40 def group_and_load_similar(loaders); end - # Returns the value of attribute loaders. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/batch.rb:38 def loaders; end end # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:6 class ActiveRecord::Associations::Preloader::Branch - # @return [Branch] a new instance of Branch - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:11 def initialize(association:, children:, parent:, associate_by_default:, scope:); end - # Returns the value of attribute associate_by_default. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:8 def associate_by_default; end - # Returns the value of attribute association. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:7 def association; end - # Returns the value of attribute children. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:7 def children; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:72 def done?; end @@ -6174,39 +5790,27 @@ class ActiveRecord::Associations::Preloader::Branch # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:118 def loaders; end - # Returns the value of attribute parent. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:7 def parent; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:108 def polymorphic?; end # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:68 def preloaded_records; end - # Sets the attribute preloaded_records - # - # @param value the value to set the attribute preloaded_records to. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:9 def preloaded_records=(_arg0); end # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:91 def preloaders_for_reflection(reflection, reflection_records); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:60 def root?; end # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:76 def runnable_loaders; end - # Returns the value of attribute scope. - # # pkg:gem/activerecord#lib/active_record/associations/preloader/branch.rb:8 def scope; end @@ -6245,8 +5849,6 @@ class ActiveRecord::Associations::Preloader::ThroughAssociation < ::ActiveRecord private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/preloader/through_association.rb:65 def data_available?; end @@ -6306,16 +5908,12 @@ class ActiveRecord::Associations::SingularAssociation < ::ActiveRecord::Associat private - # @raise [RecordInvalid] - # # pkg:gem/activerecord#lib/active_record/associations/singular_association.rb:67 def _create_record(attributes, raise_error = T.unsafe(nil), &block); end # pkg:gem/activerecord#lib/active_record/associations/singular_association.rb:47 def find_target(async: T.unsafe(nil)); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/associations/singular_association.rb:59 def replace(record); end @@ -6360,8 +5958,6 @@ module ActiveRecord::Associations::ThroughAssociation # pkg:gem/activerecord#lib/active_record/associations/through_association.rb:106 def ensure_not_nested; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/associations/through_association.rb:90 def foreign_key_present?; end @@ -6391,8 +5987,6 @@ end # pkg:gem/activerecord#lib/active_record/asynchronous_queries_tracker.rb:7 class ActiveRecord::AsynchronousQueriesTracker - # @return [AsynchronousQueriesTracker] a new instance of AsynchronousQueriesTracker - # # pkg:gem/activerecord#lib/active_record/asynchronous_queries_tracker.rb:45 def initialize; end @@ -6419,13 +6013,9 @@ end # pkg:gem/activerecord#lib/active_record/asynchronous_queries_tracker.rb:8 class ActiveRecord::AsynchronousQueriesTracker::Session - # @return [Session] a new instance of Session - # # pkg:gem/activerecord#lib/active_record/asynchronous_queries_tracker.rb:9 def initialize; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/asynchronous_queries_tracker.rb:14 def active?; end @@ -6483,18 +6073,12 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:456 class ActiveRecord::AttributeAssignmentError < ::ActiveRecord::ActiveRecordError - # @return [AttributeAssignmentError] a new instance of AttributeAssignmentError - # # pkg:gem/activerecord#lib/active_record/errors.rb:459 def initialize(message = T.unsafe(nil), exception = T.unsafe(nil), attribute = T.unsafe(nil)); end - # Returns the value of attribute attribute. - # # pkg:gem/activerecord#lib/active_record/errors.rb:457 def attribute; end - # Returns the value of attribute exception. - # # pkg:gem/activerecord#lib/active_record/errors.rb:457 def exception; end end @@ -6564,8 +6148,6 @@ module ActiveRecord::AttributeMethods # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:428 def []=(attr_name, value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:322 def _has_attribute?(attr_name); end @@ -6648,8 +6230,6 @@ module ActiveRecord::AttributeMethods # task.attribute_present?(:title) # => true # task.attribute_present?(:is_done) # => true # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:387 def attribute_present?(attr_name); end @@ -6677,8 +6257,6 @@ module ActiveRecord::AttributeMethods # person.has_attribute?('age') # => true # person.has_attribute?(:nothing) # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:316 def has_attribute?(attr_name); end @@ -6699,15 +6277,11 @@ module ActiveRecord::AttributeMethods # person.respond_to?('age?') # => true # person.respond_to?(:nothing) # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:291 def respond_to?(name, include_private = T.unsafe(nil)); end private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:499 def attribute_method?(attr_name); end @@ -6731,13 +6305,9 @@ module ActiveRecord::AttributeMethods # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:475 def method_missing(name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:543 def pk_attribute?(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:465 def respond_to_missing?(name, include_private = T.unsafe(nil)); end @@ -6875,8 +6445,6 @@ module ActiveRecord::AttributeMethods::BeforeTypeCast # pkg:gem/activerecord#lib/active_record/attribute_methods/before_type_cast.rb:93 def attribute_before_type_cast(attr_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/before_type_cast.rb:101 def attribute_came_from_user?(attr_name); end @@ -6886,8 +6454,6 @@ end # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:41 module ActiveRecord::AttributeMethods::ClassMethods - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:260 def _has_attribute?(attr_name); end @@ -6922,13 +6488,9 @@ module ActiveRecord::AttributeMethods::ClassMethods # Person.attribute_method?(:age=) # => true # Person.attribute_method?(:nothing) # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:224 def attribute_method?(attribute); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:98 def attribute_methods_generated?; end @@ -6947,16 +6509,12 @@ module ActiveRecord::AttributeMethods::ClassMethods # A method name is 'dangerous' if it is already (re)defined by Active Record, but # not by any ancestors. (So 'puts' is not dangerous but 'save' is.) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:183 def dangerous_attribute_method?(name); end # A class method is 'dangerous' if it is already (re)defined by Active Record, but # not by any ancestors. (So 'puts' is not dangerous but 'new' is.) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:201 def dangerous_class_method?(method_name); end @@ -6986,8 +6544,6 @@ module ActiveRecord::AttributeMethods::ClassMethods # Person.has_attribute?(:age) # => true # Person.has_attribute?(:nothing) # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:254 def has_attribute?(attr_name); end @@ -7009,13 +6565,9 @@ module ActiveRecord::AttributeMethods::ClassMethods # Person.instance_method_already_implemented?(:name) # # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:165 def instance_method_already_implemented?(method_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods.rb:187 def method_defined_within?(name, klass, superklass = T.unsafe(nil)); end @@ -7045,8 +6597,6 @@ module ActiveRecord::AttributeMethods::CompositePrimaryKey # Queries the primary key column's value. If the primary key is composite, # all primary key column values must be queryable. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/composite_primary_key.rb:37 def id?; end @@ -7071,8 +6621,6 @@ module ActiveRecord::AttributeMethods::CompositePrimaryKey # pkg:gem/activerecord#lib/active_record/attribute_methods/composite_primary_key.rb:57 def id_was; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/composite_primary_key.rb:16 def primary_key_values_present?; end end @@ -7180,8 +6728,6 @@ module ActiveRecord::AttributeMethods::Dirty # Will the next call to +save+ have any changes to persist? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/dirty.rb:169 def has_changes_to_save?; end @@ -7219,8 +6765,6 @@ module ActiveRecord::AttributeMethods::Dirty # When specified, this method will return false unless the value will be # changed to the given value. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/dirty.rb:86 def saved_change_to_attribute?(attr_name, **options); end @@ -7231,8 +6775,6 @@ module ActiveRecord::AttributeMethods::Dirty # Did the last call to +save+ have any changes to change? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/dirty.rb:113 def saved_changes?; end @@ -7253,8 +6795,6 @@ module ActiveRecord::AttributeMethods::Dirty # When specified, this method will return false unless the value will be # changed to the given value. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/dirty.rb:138 def will_save_change_to_attribute?(attr_name, **options); end @@ -7334,8 +6874,6 @@ module ActiveRecord::AttributeMethods::PrimaryKey # Queries the primary key column's value. If the primary key is composite, # all primary key column values must be queryable. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:34 def id?; end @@ -7360,8 +6898,6 @@ module ActiveRecord::AttributeMethods::PrimaryKey # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:46 def id_was; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:22 def primary_key_values_present?; end @@ -7373,29 +6909,21 @@ module ActiveRecord::AttributeMethods::PrimaryKey private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:61 def attribute_method?(attr_name); end end # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:65 module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:85 def composite_primary_key?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:73 def dangerous_attribute_method?(method_name); end # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:103 def get_primary_key(base_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/primary_key.rb:69 def instance_method_already_implemented?(method_name); end @@ -7494,9 +7022,6 @@ module ActiveRecord::AttributeMethods::Query private - # Returns +true+ or +false+ for the attribute identified by +attr_name+, - # depending on the attribute type and value. - # # pkg:gem/activerecord#lib/active_record/attribute_methods/query.rb:59 def attribute?(attr_name); end @@ -7531,9 +7056,6 @@ module ActiveRecord::AttributeMethods::Read private - # This method exists to avoid the expensive primary_key check internally, without - # breaking compatibility with the read_attribute API - # # pkg:gem/activerecord#lib/active_record/attribute_methods/read.rb:42 def attribute(attr_name, &block); end end @@ -7744,16 +7266,12 @@ module ActiveRecord::AttributeMethods::Serialization::ClassMethods # pkg:gem/activerecord#lib/active_record/attribute_methods/serialization.rb:218 def build_column_serializer(attr_name, coder, type, yaml = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/serialization.rb:238 def type_incompatible_with_serialize?(cast_type, coder, type); end end # pkg:gem/activerecord#lib/active_record/attribute_methods/serialization.rb:9 class ActiveRecord::AttributeMethods::Serialization::ColumnNotSerializableError < ::StandardError - # @return [ColumnNotSerializableError] a new instance of ColumnNotSerializableError - # # pkg:gem/activerecord#lib/active_record/attribute_methods/serialization.rb:10 def initialize(name, type); end end @@ -7792,8 +7310,6 @@ end module ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/attribute_methods/time_zone_conversion.rb:83 def create_time_zone_conversion_attribute?(name, cast_type); end @@ -7848,9 +7364,6 @@ module ActiveRecord::AttributeMethods::Write private - # This method exists to avoid the expensive primary_key check internally, without - # breaking compatibility with the write_attribute API - # # pkg:gem/activerecord#lib/active_record/attribute_methods/write.rb:45 def attribute=(attr_name, value); end end @@ -8107,16 +7620,12 @@ module ActiveRecord::AutosaveAssociation mixes_in_class_methods ::ActiveRecord::AutosaveAssociation::ClassMethods - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:284 def autosaving_belongs_to_for?(association); end # Returns whether or not this record has been changed in any way (including whether # any of its nested autosave associations are likewise changed) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:275 def changed_for_autosave?; end @@ -8146,8 +7655,6 @@ module ActiveRecord::AutosaveAssociation # # Only useful if the :autosave option on the parent is enabled for this associated model. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:256 def marked_for_destruction?; end @@ -8156,8 +7663,6 @@ module ActiveRecord::AutosaveAssociation # pkg:gem/activerecord#lib/active_record/autosave_association.rb:238 def reload(options = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:279 def validating_belongs_to_for?(association); end @@ -8168,8 +7673,6 @@ module ActiveRecord::AutosaveAssociation # If the record is new or it has changed, returns true. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:510 def _record_changed?(reflection, record, key); end @@ -8186,8 +7689,6 @@ module ActiveRecord::AutosaveAssociation # pkg:gem/activerecord#lib/active_record/autosave_association.rb:298 def associated_records_to_validate_or_save(association, new_record, autosave); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:517 def association_foreign_key_changed?(reflection, record, key); end @@ -8195,8 +7696,6 @@ module ActiveRecord::AutosaveAssociation # the parent, self, if it wasn't. Skips any :autosave # enabled records if they're marked_for_destruction? or destroyed. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:371 def association_valid?(association, record); end @@ -8206,8 +7705,6 @@ module ActiveRecord::AutosaveAssociation # pkg:gem/activerecord#lib/active_record/autosave_association.rb:290 def init_internals; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:526 def inverse_polymorphic_association_changed?(reflection, record); end @@ -8215,8 +7712,6 @@ module ActiveRecord::AutosaveAssociation # any new ones), and return true if any are changed for autosave. # Returns false if already called to prevent an infinite loop. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/autosave_association.rb:311 def nested_records_changed_for_autosave?; end @@ -10412,8 +9907,6 @@ end class ActiveRecord::Batches::BatchEnumerator include ::Enumerable - # @return [BatchEnumerator] a new instance of BatchEnumerator - # # pkg:gem/activerecord#lib/active_record/relation/batches/batch_enumerator.rb:8 def initialize(relation:, cursor:, of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil)); end @@ -10779,21 +10272,15 @@ module ActiveRecord::Calculations private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:430 def all_attributes?(column_names); end # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:675 def build_count_subquery(relation, column_name, distinct); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:668 def build_count_subquery?(operation, column_name, distinct); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:465 def distinct_select?(column_name); end @@ -10803,8 +10290,6 @@ module ActiveRecord::Calculations # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:483 def execute_simple_calculation(operation, column_name, distinct); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:434 def has_include?(column_name); end @@ -10817,8 +10302,6 @@ module ActiveRecord::Calculations # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:438 def perform_calculation(operation, column_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:469 def possible_aggregation?(column_names); end @@ -10837,8 +10320,6 @@ end # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:8 class ActiveRecord::Calculations::ColumnAliasTracker - # @return [ColumnAliasTracker] a new instance of ColumnAliasTracker - # # pkg:gem/activerecord#lib/active_record/relation/calculations.rb:9 def initialize(connection); end @@ -11197,8 +10678,6 @@ module ActiveRecord::Coders; end # pkg:gem/activerecord#lib/active_record/coders/column_serializer.rb:5 class ActiveRecord::Coders::ColumnSerializer - # @return [ColumnSerializer] a new instance of ColumnSerializer - # # pkg:gem/activerecord#lib/active_record/coders/column_serializer.rb:9 def initialize(attr_name, coder, object_class = T.unsafe(nil)); end @@ -11207,8 +10686,6 @@ class ActiveRecord::Coders::ColumnSerializer # pkg:gem/activerecord#lib/active_record/coders/column_serializer.rb:46 def assert_valid_value(object, action:); end - # Returns the value of attribute coder. - # # pkg:gem/activerecord#lib/active_record/coders/column_serializer.rb:7 def coder; end @@ -11221,8 +10698,6 @@ class ActiveRecord::Coders::ColumnSerializer # pkg:gem/activerecord#lib/active_record/coders/column_serializer.rb:29 def load(payload); end - # Returns the value of attribute object_class. - # # pkg:gem/activerecord#lib/active_record/coders/column_serializer.rb:6 def object_class; end @@ -11234,8 +10709,6 @@ end # pkg:gem/activerecord#lib/active_record/coders/json.rb:7 class ActiveRecord::Coders::JSON - # @return [JSON] a new instance of JSON - # # pkg:gem/activerecord#lib/active_record/coders/json.rb:10 def initialize(options = T.unsafe(nil)); end @@ -11251,8 +10724,6 @@ ActiveRecord::Coders::JSON::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) # pkg:gem/activerecord#lib/active_record/coders/yaml_column.rb:7 class ActiveRecord::Coders::YAMLColumn < ::ActiveRecord::Coders::ColumnSerializer - # @return [YAMLColumn] a new instance of YAMLColumn - # # pkg:gem/activerecord#lib/active_record/coders/yaml_column.rb:59 def initialize(attr_name, object_class = T.unsafe(nil), permitted_classes: T.unsafe(nil), unsafe_load: T.unsafe(nil)); end @@ -11270,8 +10741,6 @@ end # pkg:gem/activerecord#lib/active_record/coders/yaml_column.rb:8 class ActiveRecord::Coders::YAMLColumn::SafeCoder - # @return [SafeCoder] a new instance of SafeCoder - # # pkg:gem/activerecord#lib/active_record/coders/yaml_column.rb:9 def initialize(permitted_classes: T.unsafe(nil), unsafe_load: T.unsafe(nil)); end @@ -11284,21 +10753,15 @@ end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:187 class ActiveRecord::CompositePrimaryKeyMismatchError < ::ActiveRecord::ActiveRecordError - # @return [CompositePrimaryKeyMismatchError] a new instance of CompositePrimaryKeyMismatchError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:190 def initialize(reflection = T.unsafe(nil)); end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:188 def reflection; end end # pkg:gem/activerecord#lib/active_record/migration.rb:186 class ActiveRecord::ConcurrentMigrationError < ::ActiveRecord::MigrationError - # @return [ConcurrentMigrationError] a new instance of ConcurrentMigrationError - # # pkg:gem/activerecord#lib/active_record/migration.rb:190 def initialize(message = T.unsafe(nil)); end end @@ -11318,6 +10781,10 @@ ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.un # pkg:gem/activerecord#lib/active_record/errors.rb:397 class ActiveRecord::ConfigurationError < ::ActiveRecord::ActiveRecordError; end +# :stopdoc: +# :stopdoc: +# :stopdoc: +# # pkg:gem/activerecord#lib/active_record/connection_adapters.rb:6 module ActiveRecord::ConnectionAdapters extend ::ActiveSupport::Autoload @@ -11371,8 +10838,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter extend ::ActiveSupport::DescendantsTracker extend ::ActiveRecord::ConnectionAdapters::Quoting::ClassMethods - # @return [AbstractAdapter] a new instance of AbstractAdapter - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:132 def initialize(config_or_deprecated_connection, deprecated_logger = T.unsafe(nil), deprecated_connection_options = T.unsafe(nil), deprecated_config = T.unsafe(nil)); end @@ -11401,8 +10866,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # checking whether the database is actually capable of responding, i.e. whether # the connection isn't stale. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:705 def active?; end @@ -11417,8 +10880,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:637 def add_enum_value(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:652 def advisory_locks_enabled?; end @@ -11428,8 +10889,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:56 def allow_preconnect=(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:611 def async_enabled?; end @@ -11478,8 +10937,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # include checking whether the database is actually capable of responding, i.e. # whether the connection is stale. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:698 def connected?; end @@ -11509,16 +10966,12 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:645 def create_virtual_table(*_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:407 def database_exists?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:921 def database_version; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:901 def default_index_type?(index); end @@ -11611,8 +11064,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:918 def get_database_version; end - # Returns the value of attribute owner. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:48 def in_use?; end @@ -11632,16 +11083,12 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:289 def lease; end - # Returns the value of attribute lock. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:45 def lock; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:194 def lock_thread=(lock_thread); end - # Returns the value of attribute logger. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:45 def logger; end @@ -11651,8 +11098,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:284 def native_database_types; end - # Returns the value of attribute owner. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:45 def owner; end @@ -11662,8 +11107,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:47 def pinned=(_arg0); end - # Returns the value of attribute pool. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:44 def pool; end @@ -11677,18 +11120,12 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # sequence before the insert statement? If true, next_sequence_value # is called before each insert to set the record's primary key. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:447 def prefetch_primary_key?(table_name = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:255 def prepared_statements; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:252 def prepared_statements?; end @@ -11700,8 +11137,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # Returns true if the connection is a replica or returns # the value of +current_preventing_writes+. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:245 def preventing_writes?; end @@ -11744,15 +11179,11 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:641 def rename_enum_value(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:217 def replica?; end # Returns true if its required to reload the connection between requests for development mode. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:808 def requires_reloading?; end @@ -11774,8 +11205,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:229 def retry_deadline; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:607 def return_value_after_insert?(column); end @@ -11794,8 +11223,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # Do TransactionRollbackErrors on savepoints affect the parent # transaction? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:431 def savepoint_errors_invalidate_transactions?; end @@ -11833,245 +11260,169 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # Does this adapter support application-enforced advisory locking? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:440 def supports_advisory_locks?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:420 def supports_bulk_alter?; end # Does this adapter support creating check constraints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:512 def supports_check_constraints?; end # Does this adapter support metadata comments on database objects (tables, columns, indexes)? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:547 def supports_comments?; end # Can comments for tables, columns, and indexes be specified in create/alter table statements? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:552 def supports_comments_in_create?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:571 def supports_common_table_expressions?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:595 def supports_concurrent_connections?; end # Does this adapter support datetime with precision? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:537 def supports_datetime_with_precision?; end # Does this adapter support DDL rollbacks in transactions? That is, would # CREATE TABLE or ALTER TABLE get rolled back by a transaction? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:416 def supports_ddl_transactions?; end # Does this adapter support creating deferrable constraints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:507 def supports_deferrable_constraints?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:603 def supports_disabling_indexes?; end # Does this adapter support creating exclusion constraints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:517 def supports_exclusion_constraints?; end # Does this adapter support explain? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:476 def supports_explain?; end # Does this adapter support expression indices? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:471 def supports_expression_index?; end # Does this adapter support database extensions? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:486 def supports_extensions?; end # Does this adapter support creating foreign key constraints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:497 def supports_foreign_keys?; end # Does this adapter support foreign/external tables? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:562 def supports_foreign_tables?; end # Does this adapter support including non-key columns? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:466 def supports_index_include?; end # Does this adapter support index sort order? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:456 def supports_index_sort_order?; end # Does this adapter support creating indexes in the same statement as # creating the table? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:492 def supports_indexes_in_create?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:591 def supports_insert_conflict_target?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:583 def supports_insert_on_duplicate_skip?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:587 def supports_insert_on_duplicate_update?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:579 def supports_insert_returning?; end # Does this adapter support JSON data type? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:542 def supports_json?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:575 def supports_lazy_transactions?; end # Does this adapter support materialized views? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:532 def supports_materialized_views?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:599 def supports_nulls_not_distinct?; end # Does this adapter support optimizer hints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:567 def supports_optimizer_hints?; end # Does this adapter support partial indices? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:461 def supports_partial_index?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:451 def supports_partitioned_indexes?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:435 def supports_restart_db_transaction?; end # Does this adapter support savepoints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:425 def supports_savepoints?; end # Does this adapter support setting the isolation level for a transaction? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:481 def supports_transaction_isolation?; end # Does this adapter support creating unique constraints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:522 def supports_unique_constraints?; end # Does this adapter support creating invalid constraints? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:502 def supports_validate_constraints?; end # Does this adapter support views? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:527 def supports_views?; end # Does this adapter support virtual columns? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:557 def supports_virtual_columns?; end @@ -12092,13 +11443,9 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:38 def update(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:280 def valid_type?(type); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:851 def verified?; end @@ -12112,8 +11459,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:225 def verify_timeout; end - # Returns the value of attribute visitor. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:45 def visitor; end @@ -12146,8 +11491,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1267 def build_statement_pool; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:891 def can_perform_case_insensitive_comparison_for?(column); end @@ -12161,6 +11504,7 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter def column_for_attribute(attribute); end # Perform any necessary initialization upon the newly-established + # @raw_connection -- this is the place to modify the adapter's # connection settings, run queries to configure any application-global # "session" variables, etc. # @@ -12185,23 +11529,15 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1205 def log(sql, name = T.unsafe(nil), binds = T.unsafe(nil), type_casted_binds = T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), &block); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1153 def reconnect; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1017 def reconnect_can_restore_state?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1130 def retryable_connection_error?(exception); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1142 def retryable_query_error?(exception); end @@ -12230,8 +11566,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1125 def verified!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:1300 def warning_ignored?(warning); end @@ -12295,15 +11629,11 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # Does the database for this adapter exist? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:403 def database_exists?(config); end # Opens a database console session. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:128 def dbconsole(config, options = T.unsafe(nil)); end @@ -12322,8 +11652,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:62 def type_cast_config_to_integer(config); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:952 def valid_type?(type); end @@ -12380,16 +11708,12 @@ ActiveRecord::ConnectionAdapters::AbstractAdapter::TYPE_MAP = T.let(T.unsafe(nil class ActiveRecord::ConnectionAdapters::AbstractAdapter::Version include ::Comparable - # @return [Version] a new instance of Version - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:266 def initialize(version_string, full_version_string = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:271 def <=>(version_string); end - # Returns the value of attribute full_version_string. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract_adapter.rb:264 def full_version_string; end @@ -12399,18 +11723,9 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:117 class ActiveRecord::ConnectionAdapters::AddColumnDefinition < ::Struct - # Returns the value of attribute column - # - # @return [Object] the current value of column - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:117 def column; end - # Sets the attribute column - # - # @param value [Object] the value to set the attribute column to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:117 def column=(_); end @@ -12434,8 +11749,6 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:616 class ActiveRecord::ConnectionAdapters::AlterTable - # @return [AlterTable] a new instance of AlterTable - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:622 def initialize(td); end @@ -12448,23 +11761,15 @@ class ActiveRecord::ConnectionAdapters::AlterTable # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:634 def add_foreign_key(to_table, options); end - # Returns the value of attribute adds. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:617 def adds; end - # Returns the value of attribute check_constraint_adds. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:619 def check_constraint_adds; end - # Returns the value of attribute check_constraint_drops. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:619 def check_constraint_drops; end - # Returns the value of attribute constraint_drops. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:620 def constraint_drops; end @@ -12477,13 +11782,9 @@ class ActiveRecord::ConnectionAdapters::AlterTable # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:638 def drop_foreign_key(name); end - # Returns the value of attribute foreign_key_adds. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:618 def foreign_key_adds; end - # Returns the value of attribute foreign_key_drops. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:618 def foreign_key_drops; end @@ -12493,16 +11794,12 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:143 class ActiveRecord::ConnectionAdapters::BoundSchemaReflection - # @return [BoundSchemaReflection] a new instance of BoundSchemaReflection - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:160 def initialize(abstract_schema_reflection, pool); end # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:185 def add(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:173 def cached?(table_name); end @@ -12518,13 +11815,9 @@ class ActiveRecord::ConnectionAdapters::BoundSchemaReflection # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:197 def columns_hash(table_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:201 def columns_hash?(table_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:181 def data_source_exists?(name); end @@ -12555,50 +11848,28 @@ class ActiveRecord::ConnectionAdapters::BoundSchemaReflection end end -# :nodoc -# # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:144 class ActiveRecord::ConnectionAdapters::BoundSchemaReflection::FakePool - # @return [FakePool] a new instance of FakePool + # :nodoc # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:145 def initialize(connection); end - # @yield [@connection] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:149 def with_connection; end end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:121 class ActiveRecord::ConnectionAdapters::ChangeColumnDefaultDefinition < ::Struct - # Returns the value of attribute column - # - # @return [Object] the current value of column - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:121 def column; end - # Sets the attribute column - # - # @param value [Object] the value to set the attribute column to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:121 def column=(_); end - # Returns the value of attribute default - # - # @return [Object] the current value of default - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:121 def default; end - # Sets the attribute default - # - # @param value [Object] the value to set the attribute default to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:121 def default=(_); end @@ -12622,33 +11893,15 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:119 class ActiveRecord::ConnectionAdapters::ChangeColumnDefinition < ::Struct - # Returns the value of attribute column - # - # @return [Object] the current value of column - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:119 def column; end - # Sets the attribute column - # - # @param value [Object] the value to set the attribute column to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:119 def column=(_); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:119 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:119 def name=(_); end @@ -12672,71 +11925,36 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 class ActiveRecord::ConnectionAdapters::CheckConstraintDefinition < ::Struct - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:193 def defined_for?(name:, expression: T.unsafe(nil), validate: T.unsafe(nil), **options); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:189 def export_name_on_schema_dump?; end - # Returns the value of attribute expression - # - # @return [Object] the current value of expression - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 def expression; end - # Sets the attribute expression - # - # @param value [Object] the value to set the attribute expression to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 def expression=(_); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:180 def name; end - # Returns the value of attribute options - # - # @return [Object] the current value of options - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 def options; end - # Sets the attribute options - # - # @param value [Object] the value to set the attribute options to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 def options=(_); end - # Returns the value of attribute table_name - # - # @return [Object] the current value of table_name - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 def table_name; end - # Sets the attribute table_name - # - # @param value [Object] the value to set the attribute table_name to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:179 def table_name=(_); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:184 def validate?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:187 def validated?; end @@ -12772,8 +11990,6 @@ class ActiveRecord::ConnectionAdapters::Column # +sql_type_metadata+ is various information about the type of the column # +null+ determines if this column allows +NULL+ values. # - # @return [Column] a new instance of Column - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:20 def initialize(name, cast_type, default, sql_type_metadata = T.unsafe(nil), null = T.unsafe(nil), default_function = T.unsafe(nil), collation: T.unsafe(nil), comment: T.unsafe(nil), **_arg8); end @@ -12782,38 +11998,24 @@ class ActiveRecord::ConnectionAdapters::Column # whether the column is auto-populated by the database using a sequence # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:75 def auto_incremented_by_db?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:79 def auto_populated?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:40 def bigint?; end - # Returns the value of attribute collation. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def collation; end - # Returns the value of attribute comment. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def comment; end - # Returns the value of attribute default. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def default; end - # Returns the value of attribute default_function. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def default_function; end @@ -12826,8 +12028,6 @@ class ActiveRecord::ConnectionAdapters::Column # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:31 def fetch_cast_type(connection); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:36 def has_default?; end @@ -12848,13 +12048,9 @@ class ActiveRecord::ConnectionAdapters::Column # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:12 def limit(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def name; end - # Returns the value of attribute null. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def null; end @@ -12867,23 +12063,17 @@ class ActiveRecord::ConnectionAdapters::Column # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:12 def sql_type(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute sql_type_metadata. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:10 def sql_type_metadata; end # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:12 def type(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:109 def virtual?; end protected - # Returns the value of attribute cast_type. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:114 def cast_type; end @@ -12903,18 +12093,9 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:108 def aliased_types(name, fallback); end - # Returns the value of attribute cast_type - # - # @return [Object] the current value of cast_type - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def cast_type; end - # Sets the attribute cast_type - # - # @param value [Object] the value to set the attribute cast_type to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def cast_type=(_); end @@ -12957,18 +12138,9 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:97 def limit=(value); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def name=(_); end @@ -12978,18 +12150,9 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:97 def null=(value); end - # Returns the value of attribute options - # - # @return [Object] the current value of options - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def options; end - # Sets the attribute options - # - # @param value [Object] the value to set the attribute options to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def options=(_); end @@ -12999,8 +12162,6 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:97 def precision=(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:92 def primary_key?; end @@ -13010,33 +12171,15 @@ class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:97 def scale=(value); end - # Returns the value of attribute sql_type - # - # @return [Object] the current value of sql_type - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def sql_type; end - # Sets the attribute sql_type - # - # @param value [Object] the value to set the attribute sql_type to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def sql_type=(_); end - # Returns the value of attribute type - # - # @return [Object] the current value of type - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def type; end - # Sets the attribute type - # - # @param value [Object] the value to set the attribute type to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:78 def type=(_); end @@ -13183,16 +12326,12 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:56 class ActiveRecord::ConnectionAdapters::ConnectionHandler - # @return [ConnectionHandler] a new instance of ConnectionHandler - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:76 def initialize; end # Returns true if there are any active connections among the connection # pools that the ConnectionHandler is managing. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:157 def active_connections?(role = T.unsafe(nil)); end @@ -13214,8 +12353,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # Returns true if a connection that's accessible to this class has # already been opened. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:198 def connected?(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end @@ -13228,9 +12365,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:89 def connection_pool_names; end - # Returns the pools for a connection handler and given role. If +:all+ is passed, - # all pools belonging to the connection handler will be returned. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:102 def connection_pools(role = T.unsafe(nil)); end @@ -13273,8 +12407,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler private - # Returns the value of attribute connection_name_to_pool_manager. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:238 def connection_name_to_pool_manager; end @@ -13302,8 +12434,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # pool_config.db_config.configuration_hash # # => { host: "localhost", database: "foo", adapter: "sqlite3" } # - # @raise [AdapterNotSpecified] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:273 def resolve_pool_config(config, connection_name, role, shard); end @@ -13315,8 +12445,6 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:57 class ActiveRecord::ConnectionAdapters::ConnectionHandler::ConnectionDescriptor - # @return [ConnectionDescriptor] a new instance of ConnectionDescriptor - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:58 def initialize(name, primary = T.unsafe(nil)); end @@ -13326,8 +12454,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler::ConnectionDescriptor # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:63 def name; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_handler.rb:67 def primary_class?; end end @@ -13420,27 +12546,15 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # The default ConnectionPool maximum size is 5. # - # @return [ConnectionPool] a new instance of ConnectionPool - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:251 def initialize(*_arg0, **_arg1, &_arg2); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:342 def activate; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:346 def activated?; end - # Returns true if there is an open connection being used for the current thread. - # - # This method only works for connections that have been obtained through - # #lease_connection or #with_connection methods. Connections obtained through - # #checkout will not be detected by #active_connection? - # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:422 def active_connection; end @@ -13450,25 +12564,15 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # #lease_connection or #with_connection methods. Connections obtained through # #checkout will not be detected by #active_connection? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:419 def active_connection?; end - # Returns the value of attribute async_executor. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def async_executor; end - # Returns the value of attribute automatic_reconnect. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:239 def automatic_reconnect; end - # Sets the attribute automatic_reconnect - # - # @param value the value to set the attribute automatic_reconnect to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:239 def automatic_reconnect=(_arg0); end @@ -13502,15 +12606,9 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:1274 def checkout_and_verify(connection); end - # Returns the value of attribute checkout_timeout. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:239 def checkout_timeout; end - # Sets the attribute checkout_timeout - # - # @param value the value to set the attribute checkout_timeout to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:239 def checkout_timeout=(_arg0); end @@ -13539,8 +12637,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Returns true if a connection has already been opened. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:490 def connected?; end @@ -13562,8 +12658,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:505 def connections; end - # Returns the value of attribute db_config. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def db_config; end @@ -13576,8 +12670,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:555 def discard!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:567 def discarded?; end @@ -13629,8 +12721,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:825 def keep_alive(threshold = T.unsafe(nil)); end - # Returns the value of attribute keepalive. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def keepalive; end @@ -13643,18 +12733,12 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:355 def lease_connection; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:571 def maintainable?; end - # Returns the value of attribute max_age. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def max_age; end - # Returns the value of attribute max_connections. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def max_connections; end @@ -13664,8 +12748,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:330 def migrations_paths; end - # Returns the value of attribute min_connections. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def min_connections; end @@ -13678,16 +12760,12 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:853 def num_waiting_in_queue; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:362 def permanent_lease?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:366 def pin_connection!(lock_thread); end - # Returns the value of attribute pool_config. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def pool_config; end @@ -13717,8 +12795,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:704 def reap; end - # Returns the value of attribute reaper. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def reaper; end @@ -13752,8 +12828,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:797 def retire_old_connections(max_age = T.unsafe(nil)); end - # Returns the value of attribute role. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def role; end @@ -13775,13 +12849,9 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:243 def server_version(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute shard. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:240 def shard; end - # Returns the value of attribute max_connections. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:241 def size; end @@ -13857,8 +12927,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:987 def checkout_for_maintenance(conn); end - # @raise [ConnectionNotEstablished] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:1269 def checkout_new_connection; end @@ -13868,9 +12936,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:1282 def name_inspect; end - # -- - # if owner_thread param is omitted, this must be called in synchronize block - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:1211 def release(conn, owner_thread = T.unsafe(nil)); end @@ -13981,8 +13046,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue::BiasedCon # semantics of condition variables guarantee that +broadcast+, +broadcast_on_biased+, # +signal+ and +wait+ methods are only called while holding a lock # - # @return [BiasedConditionVariable] a new instance of BiasedConditionVariable - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:154 def initialize(lock, other_cond, preferred_thread); end @@ -14028,44 +13091,32 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:157 class ActiveRecord::ConnectionAdapters::ConnectionPool::Lease - # @return [Lease] a new instance of Lease - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:160 def initialize; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:172 def clear(connection); end - # Returns the value of attribute connection. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:158 def connection; end - # Sets the attribute connection - # - # @param value the value to set the attribute connection to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:158 def connection=(_arg0); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:165 def release; end - # Returns the value of attribute sticky. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:158 def sticky; end - # Sets the attribute sticky - # - # @param value the value to set the attribute sticky to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:158 def sticky=(_arg0); end end +# Thanks to the GVL, the LeaseRegistry doesn't need to be synchronized on MRI +# # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:185 -class ActiveRecord::ConnectionAdapters::ConnectionPool::LeaseRegistry < ::ObjectSpace::WeakKeyMap +class ActiveRecord::ConnectionAdapters::ConnectionPool::LeaseRegistry < ::ActiveRecord::ConnectionAdapters::ConnectionPool::WeakThreadKeyMap # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:186 def [](context); end end @@ -14077,8 +13128,6 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:12 class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue - # @return [Queue] a new instance of Queue - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:13 def initialize(lock = T.unsafe(nil)); end @@ -14094,8 +13143,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # Test if any threads are currently waiting on the queue. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:21 def any_waiting?; end @@ -14142,8 +13189,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # Test if the queue currently contains any elements. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:100 def any?; end @@ -14152,8 +13197,6 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # connections is strictly greater than the number of waiting # threads. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:108 def can_remove_no_wait?; end @@ -14210,18 +13253,12 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb:33 class ActiveRecord::ConnectionAdapters::ConnectionPool::Reaper - # @return [Reaper] a new instance of Reaper - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb:36 def initialize(pool, frequency); end - # Returns the value of attribute frequency. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb:34 def frequency; end - # Returns the value of attribute pool. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb:34 def pool; end @@ -14242,53 +13279,38 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Reaper end end -# pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:133 -ActiveRecord::ConnectionAdapters::ConnectionPool::WeakThreadKeyMap = ObjectSpace::WeakKeyMap +# pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:135 +class ActiveRecord::ConnectionAdapters::ConnectionPool::WeakThreadKeyMap + # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:138 + def initialize; end + + # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:146 + def [](key); end + + # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:150 + def []=(key, value); end + + # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:142 + def clear; end +end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 class ActiveRecord::ConnectionAdapters::CreateIndexDefinition < ::Struct - # Returns the value of attribute algorithm - # - # @return [Object] the current value of algorithm - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 def algorithm; end - # Sets the attribute algorithm - # - # @param value [Object] the value to set the attribute algorithm to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 def algorithm=(_); end - # Returns the value of attribute if_not_exists - # - # @return [Object] the current value of if_not_exists - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 def if_not_exists; end - # Sets the attribute if_not_exists - # - # @param value [Object] the value to set the attribute if_not_exists to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 def if_not_exists=(_); end - # Returns the value of attribute index - # - # @return [Object] the current value of index - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 def index; end - # Sets the attribute index - # - # @param value [Object] the value to set the attribute index to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:123 def index=(_); end @@ -14359,8 +13381,6 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # default; adapters that support setting the isolation level should implement # this method. # - # @raise [ActiveRecord::TransactionIsolationError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:454 def begin_isolated_db_transaction(isolation); end @@ -14381,18 +13401,6 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:386 def commit_transaction(*_arg0, **_arg1, &_arg2); end - # Executes an INSERT query and returns the new record's ID - # - # +id_value+ will be returned unless the value is +nil+, in - # which case the database will attempt to calculate the last inserted - # id and return that value. - # - # If the next id was calculated in advance (as in Oracle), it should be - # passed in as +id_value+. - # Some adapters support the `returning` keyword argument which allows defining the return value of the method: - # `nil` is the default value and maintains default behavior. If an array of column names is passed - - # an array of is returned from the method representing values of the specified columns from the inserted row. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:206 def create(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end @@ -14484,8 +13492,6 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:139 def execute(sql, name = T.unsafe(nil), allow_retry: T.unsafe(nil)); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:183 def explain(arel, binds = T.unsafe(nil), options = T.unsafe(nil)); end @@ -14748,8 +13754,6 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:384 def transaction_manager; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:398 def transaction_open?; end @@ -14778,16 +13782,11 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Determines whether the SQL statement is a write query. # - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:121 def write_query?(sql); end private - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:590 def affected_rows(raw_result); end @@ -14808,8 +13807,6 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Receive a native adapter result object and returns an ActiveRecord::Result object. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:586 def cast_result(raw_result); end @@ -14833,8 +13830,6 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:734 def last_inserted_id(result); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/database_statements.rb:578 def perform_query(raw_connection, sql, binds, type_casted_binds, prepare:, notification_payload:, batch:); end @@ -14907,36 +13902,21 @@ class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:132 def column; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:152 def custom_primary_key?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:148 def deferrable; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:165 def defined_for?(to_table: T.unsafe(nil), validate: T.unsafe(nil), **options); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:161 def export_name_on_schema_dump?; end - # Returns the value of attribute from_table - # - # @return [Object] the current value of from_table - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:127 def from_table; end - # Sets the attribute from_table - # - # @param value [Object] the value to set the attribute from_table to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:127 def from_table=(_); end @@ -14949,46 +13929,24 @@ class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:144 def on_update; end - # Returns the value of attribute options - # - # @return [Object] the current value of options - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:127 def options; end - # Sets the attribute options - # - # @param value [Object] the value to set the attribute options to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:127 def options=(_); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:136 def primary_key; end - # Returns the value of attribute to_table - # - # @return [Object] the current value of to_table - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:127 def to_table; end - # Sets the attribute to_table - # - # @param value [Object] the value to set the attribute to_table to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:127 def to_table=(_); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:156 def validate?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:159 def validated?; end @@ -15021,8 +13979,6 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:8 class ActiveRecord::ConnectionAdapters::IndexDefinition - # @return [IndexDefinition] a new instance of IndexDefinition - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:11 def initialize(table, name, unique = T.unsafe(nil), columns = T.unsafe(nil), lengths: T.unsafe(nil), orders: T.unsafe(nil), opclasses: T.unsafe(nil), where: T.unsafe(nil), type: T.unsafe(nil), using: T.unsafe(nil), include: T.unsafe(nil), nulls_not_distinct: T.unsafe(nil), comment: T.unsafe(nil), valid: T.unsafe(nil)); end @@ -15035,8 +13991,6 @@ class ActiveRecord::ConnectionAdapters::IndexDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:9 def comment; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:54 def defined_for?(columns = T.unsafe(nil), name: T.unsafe(nil), unique: T.unsafe(nil), valid: T.unsafe(nil), include: T.unsafe(nil), nulls_not_distinct: T.unsafe(nil), **options); end @@ -15073,8 +14027,6 @@ class ActiveRecord::ConnectionAdapters::IndexDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:9 def valid; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:42 def valid?; end @@ -15089,16 +14041,12 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:128 class ActiveRecord::ConnectionAdapters::NullColumn < ::ActiveRecord::ConnectionAdapters::Column - # @return [NullColumn] a new instance of NullColumn - # # pkg:gem/activerecord#lib/active_record/connection_adapters/column.rb:129 def initialize(name, **_arg1); end end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:11 class ActiveRecord::ConnectionAdapters::NullPool - # @return [NullPool] a new instance of NullPool - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:19 def initialize; end @@ -15120,8 +14068,6 @@ class ActiveRecord::ConnectionAdapters::NullPool # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:48 def pool_transaction_isolation_level; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/connection_pool.rb:49 def pool_transaction_isolation_level=(isolation_level); end @@ -15164,24 +14110,18 @@ class ActiveRecord::ConnectionAdapters::NullTransaction # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:123 def before_commit; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:112 def closed?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:119 def dirty!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:118 def dirty?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:121 def invalidate!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:120 def invalidated?; end @@ -15191,23 +14131,15 @@ class ActiveRecord::ConnectionAdapters::NullTransaction # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:127 def isolation=(_); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:114 def joinable?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:122 def materialized?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:113 def open?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:117 def restartable?; end @@ -15222,21 +14154,15 @@ end class ActiveRecord::ConnectionAdapters::PoolConfig include ::MonitorMixin - # @return [PoolConfig] a new instance of PoolConfig - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:28 def initialize(connection_class, db_config, role, shard); end - # Returns the value of attribute connection_descriptor. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:8 def connection_descriptor; end # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:43 def connection_descriptor=(connection_descriptor); end - # Returns the value of attribute db_config. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:8 def db_config; end @@ -15249,33 +14175,21 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:65 def pool; end - # Returns the value of attribute role. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:8 def role; end # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:11 def schema_reflection; end - # Sets the attribute schema_reflection - # - # @param value the value to set the attribute schema_reflection to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:9 def schema_reflection=(_arg0); end # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:39 def server_version(connection); end - # Sets the attribute server_version - # - # @param value the value to set the attribute server_version to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:9 def server_version=(_arg0); end - # Returns the value of attribute shard. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_config.rb:8 def shard; end @@ -15293,8 +14207,6 @@ ActiveRecord::ConnectionAdapters::PoolConfig::INSTANCES = T.let(T.unsafe(nil), O # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_manager.rb:5 class ActiveRecord::ConnectionAdapters::PoolManager - # @return [PoolManager] a new instance of PoolManager - # # pkg:gem/activerecord#lib/active_record/connection_adapters/pool_manager.rb:6 def initialize; end @@ -15325,18 +14237,9 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:125 class ActiveRecord::ConnectionAdapters::PrimaryKeyDefinition < ::Struct - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:125 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:125 def name=(_); end @@ -15387,10 +14290,6 @@ module ActiveRecord::ConnectionAdapters::QueryCache # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:217 def query_cache; end - # Sets the attribute query_cache - # - # @param value the value to set the attribute query_cache to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:215 def query_cache=(_arg0); end @@ -15484,8 +14383,6 @@ ActiveRecord::ConnectionAdapters::QueryCache::DEFAULT_SIZE = T.let(T.unsafe(nil) # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:113 class ActiveRecord::ConnectionAdapters::QueryCache::QueryCacheRegistry - # @return [QueryCacheRegistry] a new instance of QueryCacheRegistry - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:114 def initialize; end @@ -15511,8 +14408,6 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:44 class ActiveRecord::ConnectionAdapters::QueryCache::Store - # @return [Store] a new instance of Store - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:49 def initialize(version, max_size); end @@ -15534,8 +14429,6 @@ class ActiveRecord::ConnectionAdapters::QueryCache::Store # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:47 def dirties?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/query_cache.rb:63 def empty?; end @@ -15680,8 +14573,6 @@ module ActiveRecord::ConnectionAdapters::Quoting::ClassMethods # Quotes the column name. Must be implemented by subclasses # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/quoting.rb:60 def quote_column_name(column_name); end @@ -15710,8 +14601,6 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:202 class ActiveRecord::ConnectionAdapters::ReferenceDefinition - # @return [ReferenceDefinition] a new instance of ReferenceDefinition - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:203 def initialize(name, polymorphic: T.unsafe(nil), index: T.unsafe(nil), foreign_key: T.unsafe(nil), type: T.unsafe(nil), **options); end @@ -15738,8 +14627,6 @@ class ActiveRecord::ConnectionAdapters::ReferenceDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:258 def conditional_options; end - # Returns the value of attribute foreign_key. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:252 def foreign_key; end @@ -15749,26 +14636,18 @@ class ActiveRecord::ConnectionAdapters::ReferenceDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:300 def foreign_table_name; end - # Returns the value of attribute index. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:252 def index; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:270 def index_options(table_name); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:252 def name; end - # Returns the value of attribute options. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:252 def options; end - # Returns the value of attribute polymorphic. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:252 def polymorphic; end @@ -15778,8 +14657,6 @@ class ActiveRecord::ConnectionAdapters::ReferenceDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:262 def polymorphic_options; end - # Returns the value of attribute type. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:252 def type; end end @@ -15788,16 +14665,12 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:387 class ActiveRecord::ConnectionAdapters::RestartParentTransaction < ::ActiveRecord::ConnectionAdapters::Transaction - # @return [RestartParentTransaction] a new instance of RestartParentTransaction - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:388 def initialize(connection, parent_transaction, **options); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:407 def commit; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:411 def full_rollback?; end @@ -15821,16 +14694,12 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:415 class ActiveRecord::ConnectionAdapters::SavepointTransaction < ::ActiveRecord::ConnectionAdapters::Transaction - # @return [SavepointTransaction] a new instance of SavepointTransaction - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:416 def initialize(connection, savepoint_name, parent_transaction, **options); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:460 def commit; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:466 def full_rollback?; end @@ -15873,8 +14742,6 @@ end # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:227 class ActiveRecord::ConnectionAdapters::SchemaCache - # @return [SchemaCache] a new instance of SchemaCache - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:255 def initialize; end @@ -15886,8 +14753,6 @@ class ActiveRecord::ConnectionAdapters::SchemaCache # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:396 def add_all(pool); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:294 def cached?(table_name); end @@ -15909,15 +14774,11 @@ class ActiveRecord::ConnectionAdapters::SchemaCache # Checks whether the columns hash is already cached for a table. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:359 def columns_hash?(_pool, table_name); end # A cached lookup for table existence. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:309 def data_source_exists?(pool, name); end @@ -15959,8 +14820,6 @@ class ActiveRecord::ConnectionAdapters::SchemaCache # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:440 def derive_columns_hash_and_deduplicate_values; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:436 def ignored_table?(table_name); end @@ -15986,8 +14845,6 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_creation.rb:5 class ActiveRecord::ConnectionAdapters::SchemaCreation - # @return [SchemaCreation] a new instance of SchemaCreation - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_creation.rb:6 def initialize(conn); end @@ -16041,8 +14898,6 @@ class ActiveRecord::ConnectionAdapters::SchemaCreation # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_creation.rb:16 def supports_index_include?(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_creation.rb:137 def supports_index_using?; end @@ -16122,13 +14977,9 @@ class ActiveRecord::ConnectionAdapters::SchemaDumper < ::ActiveRecord::SchemaDum # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_dumper.rb:17 def column_spec_for_primary_key(column); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_dumper.rb:38 def default_primary_key?(column); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_dumper.rb:42 def explicit_primary_key_default?(column); end @@ -16170,16 +15021,12 @@ ActiveRecord::ConnectionAdapters::SchemaDumper::DEFAULT_DATETIME_PRECISION = T.l # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:7 class ActiveRecord::ConnectionAdapters::SchemaReflection - # @return [SchemaReflection] a new instance of SchemaReflection - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:16 def initialize(cache_path, cache = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:41 def add(pool, name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:79 def cached?(table_name); end @@ -16195,13 +15042,9 @@ class ActiveRecord::ConnectionAdapters::SchemaReflection # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:53 def columns_hash(pool, table_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:57 def columns_hash?(pool, table_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:37 def data_source_exists?(pool, name); end @@ -16237,33 +15080,19 @@ class ActiveRecord::ConnectionAdapters::SchemaReflection # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:116 def load_cache(pool); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:110 def possible_cache_available?; end class << self - # Returns the value of attribute check_schema_cache_dump_version. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:10 def check_schema_cache_dump_version; end - # Sets the attribute check_schema_cache_dump_version - # - # @param value the value to set the attribute check_schema_cache_dump_version to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:10 def check_schema_cache_dump_version=(_arg0); end - # Returns the value of attribute use_schema_cache_dump. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:9 def use_schema_cache_dump; end - # Sets the attribute use_schema_cache_dump - # - # @param value the value to set the attribute use_schema_cache_dump to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/schema_cache.rb:9 def use_schema_cache_dump=(_arg0); end end @@ -16273,53 +15102,6 @@ end module ActiveRecord::ConnectionAdapters::SchemaStatements include ::ActiveRecord::Migration::JoinTable - # Adds a reference. The reference column is a bigint by default, - # the :type option can be used to specify a different type. - # Optionally adds a +_type+ column, if :polymorphic option is provided. - # - # The +options+ hash can include the following keys: - # [:type] - # The reference column type. Defaults to +:bigint+. - # [:index] - # Add an appropriate index. Defaults to true. - # See #add_index for usage of this option. - # [:foreign_key] - # Add an appropriate foreign key constraint. Defaults to false, pass true - # to add. In case the join table can't be inferred from the association - # pass :to_table with the appropriate table name. - # [:polymorphic] - # Whether an additional +_type+ column should be added. Defaults to false. - # [:null] - # Whether the column allows nulls. Defaults to true. - # - # ====== Create a user_id bigint column without an index - # - # add_reference(:products, :user, index: false) - # - # ====== Create a user_id string column - # - # add_reference(:products, :user, type: :string) - # - # ====== Create supplier_id, supplier_type columns - # - # add_reference(:products, :supplier, polymorphic: true) - # - # ====== Create a supplier_id column with a unique index - # - # add_reference(:products, :supplier, index: { unique: true }) - # - # ====== Create a supplier_id column with a named index - # - # add_reference(:products, :supplier, index: { name: "my_supplier_index" }) - # - # ====== Create a supplier_id column and appropriate foreign key - # - # add_reference(:products, :supplier, foreign_key: true) - # - # ====== Create a supplier_id column and a foreign key to the firms table - # - # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1098 def add_belongs_to(table_name, ref_name, **options); end @@ -16749,8 +15531,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # if the same arguments were passed to #change_column_default. See #change_column_default for # information about passing a +table_name+, +column_name+, +type+ and other options that can be passed. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:757 def build_change_column_default_definition(table_name, column_name, default_or_changes); end @@ -16776,8 +15556,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # if the same arguments were passed to #create_table. See #create_table for information about # passing a +table_name+, and other additional options that can be passed. # - # @yield [table_definition] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:337 def build_create_table_definition(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options); end @@ -16790,8 +15568,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # change_column(:suppliers, :name, :string, limit: 80) # change_column(:accounts, :description, :text) # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:730 def change_column(table_name, column_name, type, **options); end @@ -16802,8 +15578,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # change_column_comment(:posts, :state, from: "old_comment", to: "new_comment") # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1570 def change_column_comment(table_name, column_name, comment_or_changes); end @@ -16821,8 +15595,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # change_column_default(:posts, :state, from: nil, to: "draft") # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:748 def change_column_default(table_name, column_name, default_or_changes); end @@ -16843,8 +15615,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Please note the fourth argument does not set a column's default. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:777 def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end @@ -16937,8 +15707,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # change_table_comment(:posts, from: "old_comment", to: "new_comment") # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1560 def change_table_comment(table_name, comment_or_changes); end @@ -16946,8 +15714,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # check_constraint_exists?(:products, name: "price_check") # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1374 def check_constraint_exists?(table_name, **options); end @@ -16957,8 +15723,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # Returns an array of check constraints for the given table. # The check constraints are represented as CheckConstraintDefinition objects. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1306 def check_constraints(table_name); end @@ -16979,8 +15743,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # column_exists?(:suppliers, :name, :string, null: false) # column_exists?(:suppliers, :tax, :decimal, precision: 8, scale: 2) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:133 def column_exists?(table_name, column_name, type = T.unsafe(nil), **options); end @@ -17219,8 +15981,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # data_source_exists?(:ebooks) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:45 def data_source_exists?(name); end @@ -17234,8 +15994,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # disable_index(:users, :email) # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1584 def disable_index(table_name, index_name); end @@ -17275,8 +16033,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # enable_index(:users, :email) # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1577 def enable_index(table_name, index_name); end @@ -17294,8 +16050,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Checks to see if a foreign key with a custom name exists. # foreign_key_exists?(:accounts, name: "special_fk_name") # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1270 def foreign_key_exists?(from_table, to_table = T.unsafe(nil), **options); end @@ -17305,8 +16059,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # Returns an array of foreign keys for the given table. # The foreign keys are represented as ForeignKeyDefinition objects. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1135 def foreign_keys(table_name); end @@ -17330,8 +16082,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Check a valid index exists (PostgreSQL only) # index_exists?(:suppliers, :company_id, valid: true) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:103 def index_exists?(table_name, column_name = T.unsafe(nil), **options); end @@ -17340,15 +16090,11 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # Verifies the existence of an index with a given name. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1043 def index_name_exists?(table_name, index_name); end # Returns an array of indexes for the given table. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:82 def indexes(table_name); end @@ -17367,8 +16113,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:15 def native_database_types; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1550 def options_include_default?(options); end @@ -17380,20 +16124,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1543 def quoted_columns_for_index(column_names, options); end - # Removes the reference(s). Also removes a +type+ column if one exists. - # - # ====== Remove the reference - # - # remove_reference(:products, :user, index: false) - # - # ====== Remove polymorphic reference - # - # remove_reference(:products, :supplier, polymorphic: true) - # - # ====== Remove the reference with a foreign key - # - # remove_reference(:products, :user, foreign_key: true) - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1131 def remove_belongs_to(table_name, ref_name, foreign_key: T.unsafe(nil), polymorphic: T.unsafe(nil), **options); end @@ -17549,8 +16279,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # rename_column(:suppliers, :description, :name) # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:785 def rename_column(table_name, column_name, new_column_name); end @@ -17567,8 +16295,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # rename_table('octopuses', 'octopi') # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:543 def rename_table(table_name, new_name, **_arg2); end @@ -17592,8 +16318,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # table_exists?(:developers) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:60 def table_exists?(table_name); end @@ -17611,8 +16335,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1505 def update_table_definition(table_name, base); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1592 def use_foreign_keys?; end @@ -17629,8 +16351,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # view_exists?(:ebooks) # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:75 def view_exists?(view_name); end @@ -17656,8 +16376,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1934 def add_timestamps_for_alter(table_name, **options); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1903 def can_remove_index_by_name?(column_name, options); end @@ -17685,15 +16403,11 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1752 def create_table_definition(name, **options); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1956 def data_source_sql(name = T.unsafe(nil), type: T.unsafe(nil)); end # Try to identify whether the given column name is an expression # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1800 def expression_column_name?(column_name); end @@ -17718,8 +16432,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1810 def foreign_key_name(table_name, options); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1851 def foreign_keys_enabled?; end @@ -17729,8 +16441,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1783 def index_column_names(column_names); end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1698 def index_name_for_remove(table_name, column_name, options); end @@ -17743,8 +16453,6 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1680 def options_for_index_columns(options); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_statements.rb:1960 def quoted_scope(name = T.unsafe(nil), type: T.unsafe(nil)); end @@ -17793,8 +16501,6 @@ class ActiveRecord::ConnectionAdapters::SqlTypeMetadata include ::ActiveRecord::ConnectionAdapters::Deduplicable extend ::ActiveRecord::ConnectionAdapters::Deduplicable::ClassMethods - # @return [SqlTypeMetadata] a new instance of SqlTypeMetadata - # # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:11 def initialize(sql_type: T.unsafe(nil), type: T.unsafe(nil), limit: T.unsafe(nil), precision: T.unsafe(nil), scale: T.unsafe(nil)); end @@ -17807,28 +16513,18 @@ class ActiveRecord::ConnectionAdapters::SqlTypeMetadata # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:29 def hash; end - # Returns the value of attribute limit. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:9 def limit; end - # Returns the value of attribute precision. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:9 def precision; end - # Returns the value of attribute scale. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:9 def scale; end - # Returns the value of attribute sql_type. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:9 def sql_type; end - # Returns the value of attribute type. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/sql_type_metadata.rb:9 def type; end @@ -17889,18 +16585,9 @@ class ActiveRecord::ConnectionAdapters::Table include ::ActiveRecord::ConnectionAdapters::ColumnMethods extend ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods - # @return [Table] a new instance of Table - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:712 def initialize(table_name, base); end - # Adds a reference. - # - # t.references(:user) - # t.belongs_to(:supplier, foreign_key: true) - # - # See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:869 def belongs_to(*args, **options); end @@ -17952,8 +16639,6 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.check_constraint_exists?}[rdoc-ref:SchemaStatements#check_constraint_exists?] # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:941 def check_constraint_exists?(*args, **options); end @@ -17972,8 +16657,6 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.column_exists?}[rdoc-ref:SchemaStatements#column_exists?] # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:736 def column_exists?(column_name, type = T.unsafe(nil), **options); end @@ -17993,8 +16676,6 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.foreign_key_exists?}[rdoc-ref:SchemaStatements#foreign_key_exists?] # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:912 def foreign_key_exists?(*args, **options); end @@ -18018,13 +16699,9 @@ class ActiveRecord::ConnectionAdapters::Table # # See {connection.index_exists?}[rdoc-ref:SchemaStatements#index_exists?] # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:760 def index_exists?(column_name = T.unsafe(nil), **options); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:710 def name; end @@ -18048,13 +16725,6 @@ class ActiveRecord::ConnectionAdapters::Table # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:821 def remove(*column_names, **options); end - # Removes a reference. Optionally removes a +type+ column. - # - # t.remove_references(:user) - # t.remove_belongs_to(:supplier, polymorphic: true) - # - # See {connection.remove_reference}[rdoc-ref:SchemaStatements#remove_reference] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:883 def remove_belongs_to(*args, **options); end @@ -18166,8 +16836,6 @@ class ActiveRecord::ConnectionAdapters::TableDefinition include ::ActiveRecord::ConnectionAdapters::ColumnMethods extend ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods - # @return [TableDefinition] a new instance of TableDefinition - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:363 def initialize(conn, name, temporary: T.unsafe(nil), if_not_exists: T.unsafe(nil), options: T.unsafe(nil), as: T.unsafe(nil), comment: T.unsafe(nil), **_arg7); end @@ -18176,27 +16844,15 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:413 def [](name); end - # Returns the value of attribute as. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def as; end - # Adds a reference. - # - # t.references(:user) - # t.belongs_to(:supplier, foreign_key: true) - # t.belongs_to(:supplier, foreign_key: true, type: :integer) - # - # See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:548 def belongs_to(*args, **options); end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:517 def check_constraint(expression, **options); end - # Returns the value of attribute check_constraints. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def check_constraints; end @@ -18276,21 +16932,15 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:410 def columns; end - # Returns the value of attribute comment. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def comment; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:513 def foreign_key(to_table, **options); end - # Returns the value of attribute foreign_keys. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def foreign_keys; end - # Returns the value of attribute if_not_exists. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def if_not_exists; end @@ -18302,13 +16952,9 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:509 def index(column_name, **options); end - # Returns the value of attribute indexes. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def indexes; end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def name; end @@ -18321,8 +16967,6 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:567 def new_foreign_key_definition(to_table, options); end - # Returns the value of attribute options. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def options; end @@ -18349,8 +16993,6 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:387 def set_primary_key(table_name, id, primary_key, **options); end - # Returns the value of attribute temporary. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:361 def temporary; end @@ -18370,8 +17012,6 @@ class ActiveRecord::ConnectionAdapters::TableDefinition # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:585 def create_column_definition(name, type, options); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/schema_definitions.rb:597 def integer_like_primary_key?(type, options); end @@ -18387,8 +17027,6 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:130 class ActiveRecord::ConnectionAdapters::Transaction - # @return [Transaction] a new instance of Transaction - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:164 def initialize(connection, isolation: T.unsafe(nil), joinable: T.unsafe(nil), run_commit_callbacks: T.unsafe(nil)); end @@ -18407,29 +17045,21 @@ class ActiveRecord::ConnectionAdapters::Transaction # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:285 def before_commit_records; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:192 def closed?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:309 def commit_records; end - # Returns the value of attribute connection. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:150 def connection; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:180 def dirty!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:184 def dirty?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:338 def full_rollback?; end @@ -18450,26 +17080,18 @@ class ActiveRecord::ConnectionAdapters::Transaction # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:160 def isolation=(isolation); end - # Returns the value of attribute isolation_level. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:150 def isolation_level; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:339 def joinable?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:248 def materialize!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:253 def materialized?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:188 def open?; end @@ -18479,8 +17101,6 @@ class ActiveRecord::ConnectionAdapters::Transaction # Can this transaction's current state be recreated by # rollback+begin ? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:240 def restartable?; end @@ -18490,30 +17110,18 @@ class ActiveRecord::ConnectionAdapters::Transaction # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:265 def rollback_records; end - # Returns the value of attribute savepoint_name. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:150 def savepoint_name; end - # Returns the value of attribute state. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:150 def state; end - # Returns the value of attribute user_transaction. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:150 def user_transaction; end - # Returns the value of attribute written. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:151 def written; end - # Sets the attribute written - # - # @param value the value to set the attribute written to. - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:151 def written=(_arg0); end @@ -18536,8 +17144,6 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:131 class ActiveRecord::ConnectionAdapters::Transaction::Callback - # @return [Callback] a new instance of Callback - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:132 def initialize(event, callback); end @@ -18553,18 +17159,12 @@ end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:79 class ActiveRecord::ConnectionAdapters::TransactionInstrumenter - # @return [TransactionInstrumenter] a new instance of TransactionInstrumenter - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:80 def initialize(payload = T.unsafe(nil)); end - # @raise [InstrumentationNotStartedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:101 def finish(outcome); end - # @raise [InstrumentationAlreadyStartedError] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:90 def start; end end @@ -18577,8 +17177,6 @@ class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::Instrumentation # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:518 class ActiveRecord::ConnectionAdapters::TransactionManager - # @return [TransactionManager] a new instance of TransactionManager - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:519 def initialize(connection); end @@ -18600,8 +17198,6 @@ class ActiveRecord::ConnectionAdapters::TransactionManager # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:574 def enable_lazy_transactions!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:578 def lazy_transactions_enabled?; end @@ -18611,8 +17207,6 @@ class ActiveRecord::ConnectionAdapters::TransactionManager # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:679 def open_transactions; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:594 def restorable?; end @@ -18640,8 +17234,6 @@ ActiveRecord::ConnectionAdapters::TransactionManager::NULL_TRANSACTION = T.let(T # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:8 class ActiveRecord::ConnectionAdapters::TransactionState - # @return [TransactionState] a new instance of TransactionState - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:9 def initialize(state = T.unsafe(nil)); end @@ -18651,18 +17243,12 @@ class ActiveRecord::ConnectionAdapters::TransactionState # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:66 def commit!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:23 def committed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:47 def completed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:19 def finalized?; end @@ -18672,26 +17258,18 @@ class ActiveRecord::ConnectionAdapters::TransactionState # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:56 def full_rollback!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:27 def fully_committed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:43 def fully_completed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:35 def fully_rolledback?; end # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:61 def invalidate!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:39 def invalidated?; end @@ -18701,8 +17279,6 @@ class ActiveRecord::ConnectionAdapters::TransactionState # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:51 def rollback!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_adapters/abstract/transaction.rb:31 def rolledback?; end end @@ -18730,8 +17306,6 @@ module ActiveRecord::ConnectionHandling # Returns +true+ if Active Record is connected. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:354 def connected?; end @@ -18780,8 +17354,6 @@ module ActiveRecord::ConnectionHandling # ActiveRecord::Base.connected_to?(role: :writing, shard: :shard_one) #=> true # end # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:256 def connected_to?(role:, shard: T.unsafe(nil)); end @@ -18847,9 +17419,7 @@ module ActiveRecord::ConnectionHandling # pkg:gem/activerecord#lib/active_record/connection_handling.rb:319 def connection_specification_name; end - # Sets the attribute connection_specification_name - # - # @param value the value to set the attribute connection_specification_name to. + # Returns the connection specification name from the current class or its parent. # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:316 def connection_specification_name=(_arg0); end @@ -18880,8 +17450,6 @@ module ActiveRecord::ConnectionHandling # # Returns an array of database connections. # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:81 def connects_to(database: T.unsafe(nil), shards: T.unsafe(nil)); end @@ -18939,8 +17507,6 @@ module ActiveRecord::ConnectionHandling # pkg:gem/activerecord#lib/active_record/connection_handling.rb:272 def lease_connection; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:326 def primary_class?; end @@ -18973,13 +17539,9 @@ module ActiveRecord::ConnectionHandling # Determine whether or not shard swapping is currently prohibited # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:223 def shard_swapping_prohibited?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/connection_handling.rb:383 def sharded?; end @@ -19032,23 +17594,15 @@ ActiveRecord::ConnectionHandling::RAILS_ENV = T.let(T.unsafe(nil), Proc) # # pkg:gem/activerecord#lib/active_record/errors.rb:88 class ActiveRecord::ConnectionNotDefined < ::ActiveRecord::ConnectionNotEstablished - # @return [ConnectionNotDefined] a new instance of ConnectionNotDefined - # # pkg:gem/activerecord#lib/active_record/errors.rb:89 def initialize(message = T.unsafe(nil), connection_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil)); end - # Returns the value of attribute connection_name. - # # pkg:gem/activerecord#lib/active_record/errors.rb:96 def connection_name; end - # Returns the value of attribute role. - # # pkg:gem/activerecord#lib/active_record/errors.rb:96 def role; end - # Returns the value of attribute shard. - # # pkg:gem/activerecord#lib/active_record/errors.rb:96 def shard; end end @@ -19059,8 +17613,6 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:66 class ActiveRecord::ConnectionNotEstablished < ::ActiveRecord::AdapterError - # @return [ConnectionNotEstablished] a new instance of ConnectionNotEstablished - # # pkg:gem/activerecord#lib/active_record/errors.rb:67 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end @@ -19095,9 +17647,6 @@ module ActiveRecord::Core # # Instantiates a single new object # User.new(first_name: 'Jamie') # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Core] the object that the method was called on - # # pkg:gem/activerecord#lib/active_record/core.rb:472 def initialize(attributes = T.unsafe(nil)); end @@ -19119,8 +17668,6 @@ module ActiveRecord::Core # pkg:gem/activerecord#lib/active_record/core.rb:632 def ==(comparison_object); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:678 def blank?; end @@ -19143,16 +17690,6 @@ module ActiveRecord::Core # pkg:gem/activerecord#lib/active_record/core.rb:588 def encode_with(coder); end - # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ - # is of the same type and +self+ has an ID and it is equal to +comparison_object.id+. - # - # Note that new records are different from any other record by definition, unless the - # other record is the receiver itself. Besides, if you fetch existing records with - # +select+ and leave the ID out, you're on your own, this predicate will return false. - # - # Note also that destroying a record preserves its ID in the model instance, so deleted - # models are still comparable. - # # pkg:gem/activerecord#lib/active_record/core.rb:638 def eql?(comparison_object); end @@ -19165,8 +17702,6 @@ module ActiveRecord::Core # Returns +true+ if the attributes hash has been frozen. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:661 def frozen?; end @@ -19210,9 +17745,6 @@ module ActiveRecord::Core # +attributes+ should be an attributes object, and unlike the # `initialize` method, no assignment calls are made per attribute. # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Core] the object that the method was called on - # # pkg:gem/activerecord#lib/active_record/core.rb:509 def init_with_attributes(attributes, new_record = T.unsafe(nil)); end @@ -19230,8 +17762,6 @@ module ActiveRecord::Core # pkg:gem/activerecord#lib/active_record/core.rb:785 def inspect; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:674 def present?; end @@ -19270,8 +17800,6 @@ module ActiveRecord::Core # Returns +true+ if the record is read only. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:683 def readonly?; end @@ -19312,27 +17840,19 @@ module ActiveRecord::Core # Returns +true+ if the record is in strict_loading mode. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:688 def strict_loading?; end # Returns +true+ if the record uses strict_loading with +:all+ mode enabled. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:740 def strict_loading_all?; end - # Returns the value of attribute strict_loading_mode. - # # pkg:gem/activerecord#lib/active_record/core.rb:732 def strict_loading_mode; end # Returns +true+ if the record uses strict_loading with +:n_plus_one_only+ mode enabled. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:735 def strict_loading_n_plus_one_only?; end @@ -19344,8 +17864,6 @@ module ActiveRecord::Core # pkg:gem/activerecord#lib/active_record/core.rb:887 def attributes_for_inspect; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/core.rb:857 def custom_inspect_method_defined?; end @@ -19518,8 +18036,6 @@ module ActiveRecord::CounterCache # pkg:gem/activerecord#lib/active_record/counter_cache.rb:225 def _create_record(attribute_names = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/counter_cache.rb:251 def _foreign_keys_equal?(fkey1, fkey2); end @@ -19543,8 +18059,6 @@ end # pkg:gem/activerecord#lib/active_record/counter_cache.rb:13 module ActiveRecord::CounterCache::ClassMethods - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/counter_cache.rb:207 def counter_cache_column?(name); end @@ -19713,18 +18227,12 @@ class ActiveRecord::DatabaseAlreadyExists < ::ActiveRecord::StatementInvalid; en # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:4 class ActiveRecord::DatabaseConfigurations - # @return [DatabaseConfigurations] a new instance of DatabaseConfigurations - # # pkg:gem/activerecord#lib/active_record/database_configurations.rb:75 def initialize(configurations = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/database_configurations.rb:27 def any?(*_arg0, **_arg1, &_arg2); end - # Checks if the application's configurations are empty. - # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations.rb:155 def blank?; end @@ -19753,15 +18261,11 @@ class ActiveRecord::DatabaseConfigurations # pkg:gem/activerecord#lib/active_record/database_configurations.rb:100 def configs_for(env_name: T.unsafe(nil), name: T.unsafe(nil), config_key: T.unsafe(nil), include_hidden: T.unsafe(nil)); end - # Returns the value of attribute configurations. - # # pkg:gem/activerecord#lib/active_record/database_configurations.rb:26 def configurations; end # Checks if the application's configurations are empty. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations.rb:152 def empty?; end @@ -19780,8 +18284,6 @@ class ActiveRecord::DatabaseConfigurations # example, when Rails dumps the schema, the primary configuration's schema # file will be named `schema.rb` instead of `primary_schema.rb`. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations.rb:144 def primary?(name); end @@ -19909,8 +18411,6 @@ class ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver # timeout: "3000" # } # - # @return [ConnectionUrlResolver] a new instance of ConnectionUrlResolver - # # pkg:gem/activerecord#lib/active_record/database_configurations/connection_url_resolver.rb:25 def initialize(url); end @@ -19945,8 +18445,6 @@ class ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver # pkg:gem/activerecord#lib/active_record/database_configurations/connection_url_resolver.rb:82 def resolved_adapter; end - # Returns the value of attribute uri. - # # pkg:gem/activerecord#lib/active_record/database_configurations/connection_url_resolver.rb:45 def uri; end @@ -19960,82 +18458,54 @@ end # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:8 class ActiveRecord::DatabaseConfigurations::DatabaseConfig - # @return [DatabaseConfig] a new instance of DatabaseConfig - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:11 def initialize(env_name, name); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:43 def _database=(database); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:47 def adapter; end # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:17 def adapter_class; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:75 def checkout_timeout; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:39 def database; end # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:9 def env_name; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:95 def for_current_env?; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:35 def host; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:83 def idle_timeout; end # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:21 def inspect; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:55 def max_connections; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:67 def max_queue; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:63 def max_threads; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:91 def migrations_paths; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:51 def min_connections; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:59 def min_threads; end @@ -20045,36 +18515,21 @@ class ActiveRecord::DatabaseConfigurations::DatabaseConfig # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:25 def new_connection; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:71 def query_cache; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:79 def reaping_frequency; end - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:87 def replica?; end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:99 def schema_cache_path; end - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:107 def seeds?; end - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/database_config.rb:103 def use_metadata_table?; end @@ -20113,8 +18568,6 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # database adapter, name, and other important information for database # connections. # - # @return [HashConfig] a new instance of HashConfig - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:38 def initialize(env_name, name, configuration_hash); end @@ -20127,16 +18580,12 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:112 def checkout_timeout; end - # Returns the value of attribute configuration_hash. - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:23 def configuration_hash; end # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:65 def database; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:190 def database_tasks?; end @@ -20182,8 +18631,6 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:84 def pool(*args, **_arg1, &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:152 def primary?; end @@ -20197,8 +18644,6 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # connection. If the `replica` key is present in the config, `replica?` will # return `true`. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:47 def replica?; end @@ -20228,16 +18673,12 @@ class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::Databas # If the `seeds` key is present in the config, `seeds?` will return its value. Otherwise, it # will return `true` for the primary database and `false` for all other configs. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:160 def seeds?; end # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:61 def socket; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/database_configurations/hash_config.rb:194 def use_metadata_table?; end @@ -20291,13 +18732,9 @@ class ActiveRecord::DatabaseConfigurations::UrlConfig < ::ActiveRecord::Database # database adapter, name, and other important information for database # connections. # - # @return [UrlConfig] a new instance of UrlConfig - # # pkg:gem/activerecord#lib/active_record/database_configurations/url_config.rb:40 def initialize(env_name, name, url, configuration_hash = T.unsafe(nil)); end - # Returns the value of attribute url. - # # pkg:gem/activerecord#lib/active_record/database_configurations/url_config.rb:25 def url; end @@ -20321,8 +18758,6 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:101 class ActiveRecord::DatabaseConnectionError < ::ActiveRecord::ConnectionNotEstablished - # @return [DatabaseConnectionError] a new instance of DatabaseConnectionError - # # pkg:gem/activerecord#lib/active_record/errors.rb:102 def initialize(message = T.unsafe(nil)); end @@ -20697,8 +19132,6 @@ module ActiveRecord::Delegation private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/delegation.rb:149 def respond_to_missing?(method, _); end @@ -20788,8 +19221,6 @@ ActiveRecord::Delegation::GeneratedRelationMethods::MUTEX = T.let(T.unsafe(nil), # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:256 class ActiveRecord::DeleteRestrictionError < ::ActiveRecord::ActiveRecordError - # @return [DeleteRestrictionError] a new instance of DeleteRestrictionError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:257 def initialize(name = T.unsafe(nil)); end end @@ -20811,8 +19242,6 @@ class ActiveRecord::DestroyAssociationAsyncJob < ::ActiveJob::Base private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/destroy_association_async_job.rb:34 def owner_destroyed?(owner, ensuring_owner_was_method); end @@ -20835,21 +19264,15 @@ end # pkg:gem/activerecord#lib/active_record/disable_joins_association_relation.rb:4 class ActiveRecord::DisableJoinsAssociationRelation < ::ActiveRecord::Relation - # @return [DisableJoinsAssociationRelation] a new instance of DisableJoinsAssociationRelation - # # pkg:gem/activerecord#lib/active_record/disable_joins_association_relation.rb:7 def initialize(klass, key, ids); end # pkg:gem/activerecord#lib/active_record/disable_joins_association_relation.rb:17 def first(limit = T.unsafe(nil)); end - # Returns the value of attribute ids. - # # pkg:gem/activerecord#lib/active_record/disable_joins_association_relation.rb:5 def ids; end - # Returns the value of attribute key. - # # pkg:gem/activerecord#lib/active_record/disable_joins_association_relation.rb:5 def key; end @@ -20862,16 +19285,12 @@ end # pkg:gem/activerecord#lib/active_record/migration.rb:101 class ActiveRecord::DuplicateMigrationNameError < ::ActiveRecord::MigrationError - # @return [DuplicateMigrationNameError] a new instance of DuplicateMigrationNameError - # # pkg:gem/activerecord#lib/active_record/migration.rb:102 def initialize(name = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/migration.rb:91 class ActiveRecord::DuplicateMigrationVersionError < ::ActiveRecord::MigrationError - # @return [DuplicateMigrationVersionError] a new instance of DuplicateMigrationVersionError - # # pkg:gem/activerecord#lib/active_record/migration.rb:92 def initialize(version = T.unsafe(nil)); end end @@ -20883,8 +19302,6 @@ module ActiveRecord::DynamicMatchers # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:17 def method_missing(name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:6 def respond_to_missing?(name, _); end end @@ -20895,13 +19312,9 @@ class ActiveRecord::DynamicMatchers::FindBy < ::ActiveRecord::DynamicMatchers::M # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:84 def finder; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:80 def match?(name); end - # Returns the value of attribute pattern. - # # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:78 def pattern; end end @@ -20913,13 +19326,9 @@ class ActiveRecord::DynamicMatchers::FindByBang < ::ActiveRecord::DynamicMatcher # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:100 def finder; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:96 def match?(name); end - # Returns the value of attribute pattern. - # # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:94 def pattern; end end @@ -20934,8 +19343,6 @@ class ActiveRecord::DynamicMatchers::Method # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:30 def match(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/dynamic_matchers.rb:34 def valid?(model, name); end @@ -20970,8 +19377,6 @@ end # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:243 class ActiveRecord::EagerLoadPolymorphicError < ::ActiveRecord::ActiveRecordError - # @return [EagerLoadPolymorphicError] a new instance of EagerLoadPolymorphicError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:244 def initialize(reflection = T.unsafe(nil)); end end @@ -21034,8 +19439,6 @@ end # pkg:gem/activerecord#lib/active_record/encryption/auto_filtered_parameters.rb:5 class ActiveRecord::Encryption::AutoFilteredParameters - # @return [AutoFilteredParameters] a new instance of AutoFilteredParameters - # # pkg:gem/activerecord#lib/active_record/encryption/auto_filtered_parameters.rb:6 def initialize(app); end @@ -21044,8 +19447,6 @@ class ActiveRecord::Encryption::AutoFilteredParameters private - # Returns the value of attribute app. - # # pkg:gem/activerecord#lib/active_record/encryption/auto_filtered_parameters.rb:20 def app; end @@ -21061,13 +19462,9 @@ class ActiveRecord::Encryption::AutoFilteredParameters # pkg:gem/activerecord#lib/active_record/encryption/auto_filtered_parameters.rb:48 def collect_for_later(klass, attribute); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/auto_filtered_parameters.rb:44 def collecting?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/auto_filtered_parameters.rb:61 def excluded_from_filter_parameters?(filter_parameter); end @@ -21126,8 +19523,6 @@ class ActiveRecord::Encryption::Cipher::Aes256Gcm # When iv not provided, it will generate a random iv on each encryption operation (default and # recommended operation) # - # @return [Aes256Gcm] a new instance of Aes256Gcm - # # pkg:gem/activerecord#lib/active_record/encryption/cipher/aes256_gcm.rb:29 def initialize(secret, deterministic: T.unsafe(nil)); end @@ -21167,92 +19562,48 @@ ActiveRecord::Encryption::Cipher::DEFAULT_ENCODING = T.let(T.unsafe(nil), Encodi # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:8 class ActiveRecord::Encryption::Config - # @return [Config] a new instance of Config - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:14 def initialize; end - # Returns the value of attribute add_to_filter_parameters. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def add_to_filter_parameters; end - # Sets the attribute add_to_filter_parameters - # - # @param value the value to set the attribute add_to_filter_parameters to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def add_to_filter_parameters=(_arg0); end - # Returns the value of attribute compressor. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def compressor; end - # Sets the attribute compressor - # - # @param value the value to set the attribute compressor to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def compressor=(_arg0); end - # Returns the value of attribute deterministic_key. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def deterministic_key; end - # Sets the attribute deterministic_key - # - # @param value the value to set the attribute deterministic_key to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def deterministic_key=(_arg0); end - # Returns the value of attribute encrypt_fixtures. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def encrypt_fixtures; end - # Sets the attribute encrypt_fixtures - # - # @param value the value to set the attribute encrypt_fixtures to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def encrypt_fixtures=(_arg0); end - # Returns the value of attribute excluded_from_filter_parameters. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def excluded_from_filter_parameters; end - # Sets the attribute excluded_from_filter_parameters - # - # @param value the value to set the attribute excluded_from_filter_parameters to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def excluded_from_filter_parameters=(_arg0); end - # Returns the value of attribute extend_queries. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def extend_queries; end - # Sets the attribute extend_queries - # - # @param value the value to set the attribute extend_queries to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def extend_queries=(_arg0); end - # Returns the value of attribute forced_encoding_for_deterministic_encryption. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def forced_encoding_for_deterministic_encryption; end - # Sets the attribute forced_encoding_for_deterministic_encryption - # - # @param value the value to set the attribute forced_encoding_for_deterministic_encryption to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def forced_encoding_for_deterministic_encryption=(_arg0); end @@ -21265,27 +19616,15 @@ class ActiveRecord::Encryption::Config # pkg:gem/activerecord#lib/active_record/encryption/config.rb:37 def has_primary_key?; end - # Returns the value of attribute hash_digest_class. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def hash_digest_class; end - # Sets the attribute hash_digest_class - # - # @param value the value to set the attribute hash_digest_class to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def hash_digest_class=(_arg0); end - # Returns the value of attribute key_derivation_salt. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def key_derivation_salt; end - # Sets the attribute key_derivation_salt - # - # @param value the value to set the attribute key_derivation_salt to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def key_derivation_salt=(_arg0); end @@ -21296,66 +19635,36 @@ class ActiveRecord::Encryption::Config # pkg:gem/activerecord#lib/active_record/encryption/config.rb:21 def previous=(previous_schemes_properties); end - # Returns the value of attribute previous_schemes. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def previous_schemes; end - # Sets the attribute previous_schemes - # - # @param value the value to set the attribute previous_schemes to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def previous_schemes=(_arg0); end - # Returns the value of attribute primary_key. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def primary_key; end - # Sets the attribute primary_key - # - # @param value the value to set the attribute primary_key to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def primary_key=(_arg0); end - # Returns the value of attribute store_key_references. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def store_key_references; end - # Sets the attribute store_key_references - # - # @param value the value to set the attribute store_key_references to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def store_key_references=(_arg0); end # pkg:gem/activerecord#lib/active_record/encryption/config.rb:27 def support_sha1_for_non_deterministic_encryption=(value); end - # Returns the value of attribute support_unencrypted_data. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def support_unencrypted_data; end - # Sets the attribute support_unencrypted_data - # - # @param value the value to set the attribute support_unencrypted_data to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def support_unencrypted_data=(_arg0); end - # Returns the value of attribute validate_column_size. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def validate_column_size; end - # Sets the attribute validate_column_size - # - # @param value the value to set the attribute validate_column_size to. - # # pkg:gem/activerecord#lib/active_record/encryption/config.rb:9 def validate_column_size=(_arg0); end @@ -21417,8 +19726,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/context.rb:12 class ActiveRecord::Encryption::Context - # @return [Context] a new instance of Context - # # pkg:gem/activerecord#lib/active_record/encryption/context.rb:17 def initialize; end @@ -21514,8 +19821,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/derived_secret_key_provider.rb:6 class ActiveRecord::Encryption::DerivedSecretKeyProvider < ::ActiveRecord::Encryption::KeyProvider - # @return [DerivedSecretKeyProvider] a new instance of DerivedSecretKeyProvider - # # pkg:gem/activerecord#lib/active_record/encryption/derived_secret_key_provider.rb:7 def initialize(passwords, key_generator: T.unsafe(nil)); end @@ -21529,9 +19834,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/deterministic_key_provider.rb:6 class ActiveRecord::Encryption::DeterministicKeyProvider < ::ActiveRecord::Encryption::DerivedSecretKeyProvider - # @raise [ActiveRecord::Encryption::Errors::Configuration] - # @return [DeterministicKeyProvider] a new instance of DeterministicKeyProvider - # # pkg:gem/activerecord#lib/active_record/encryption/deterministic_key_provider.rb:7 def initialize(password); end end @@ -21564,8 +19866,6 @@ module ActiveRecord::Encryption::EncryptableRecord # Returns whether a given attribute is encrypted or not. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encryptable_record.rb:146 def encrypted_attribute?(attribute_name); end @@ -21589,13 +19889,9 @@ module ActiveRecord::Encryption::EncryptableRecord # pkg:gem/activerecord#lib/active_record/encryption/encryptable_record.rb:187 def encrypt_attributes; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encryptable_record.rb:204 def has_encrypted_attributes?; end - # @raise [ActiveRecord::Encryption::Errors::Configuration] - # # pkg:gem/activerecord#lib/active_record/encryption/encryptable_record.rb:200 def validate_encryption_allowed; end @@ -21669,8 +19965,6 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Va # * :cast_type - A type that will be used to serialize (before encrypting) and deserialize # (after decrypting). ActiveModel::Type::String by default. # - # @return [EncryptedAttributeType] a new instance of EncryptedAttributeType - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:23 def initialize(scheme:, cast_type: T.unsafe(nil), previous_type: T.unsafe(nil), default: T.unsafe(nil)); end @@ -21680,13 +19974,9 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Va # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:31 def cast(value); end - # Returns the value of attribute cast_type. - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:13 def cast_type; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:51 def changed_in_place?(raw_old_value, new_value); end @@ -21699,8 +19989,6 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Va # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:15 def downcase?(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:47 def encrypted?(value); end @@ -21716,16 +20004,12 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Va # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:56 def previous_types; end - # Returns the value of attribute scheme. - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:13 def scheme; end # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:39 def serialize(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:61 def support_unencrypted_data?; end @@ -21773,8 +20057,6 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Va # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:66 def previous_schemes_including_clean_text; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:80 def previous_type?; end @@ -21787,8 +20069,6 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Va # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:126 def serialize_with_oldest(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encrypted_attribute_type.rb:122 def serialize_with_oldest?; end @@ -21840,18 +20120,12 @@ class ActiveRecord::Encryption::Encryptor # If not provided, will default to +ActiveRecord::Encryption.config.compressor+, # which itself defaults to +Zlib+. # - # @return [Encryptor] a new instance of Encryptor - # # pkg:gem/activerecord#lib/active_record/encryption/encryptor.rb:27 def initialize(compress: T.unsafe(nil), compressor: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encryptor.rb:86 def binary?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encryptor.rb:90 def compress?; end @@ -21900,8 +20174,6 @@ class ActiveRecord::Encryption::Encryptor # Returns whether the text is encrypted or not. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/encryptor.rb:79 def encrypted?(text); end @@ -22062,18 +20334,12 @@ end # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:134 class ActiveRecord::Encryption::ExtendedDeterministicQueries::AdditionalValue - # @return [AdditionalValue] a new instance of AdditionalValue - # # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:137 def initialize(value, type); end - # Returns the value of attribute type. - # # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:135 def type; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:135 def value; end @@ -22100,6 +20366,10 @@ end # +activerecord/test/cases/encryption/performance/extended_deterministic_queries_performance_test.rb+ # to make sure performance overhead is acceptable. # +# @TODO We will extend this to support previous "encryption context" versions in future iterations +# @TODO Experimental. Support for every kind of query is pending +# @TODO It should not patch anything if not needed (no previous schemes or no support for previous encryption schemes) +# # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:41 module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQuery class << self @@ -22124,8 +20394,6 @@ end # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:97 module ActiveRecord::Encryption::ExtendedDeterministicQueries::RelationQueries - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/extended_deterministic_queries.rb:102 def exists?(*args); end @@ -22158,21 +20426,15 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/key.rb:10 class ActiveRecord::Encryption::Key - # @return [Key] a new instance of Key - # # pkg:gem/activerecord#lib/active_record/encryption/key.rb:13 def initialize(secret); end # pkg:gem/activerecord#lib/active_record/encryption/key.rb:23 def id; end - # Returns the value of attribute public_tags. - # # pkg:gem/activerecord#lib/active_record/encryption/key.rb:11 def public_tags; end - # Returns the value of attribute secret. - # # pkg:gem/activerecord#lib/active_record/encryption/key.rb:11 def secret; end @@ -22186,8 +20448,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/key_generator.rb:8 class ActiveRecord::Encryption::KeyGenerator - # @return [KeyGenerator] a new instance of KeyGenerator - # # pkg:gem/activerecord#lib/active_record/encryption/key_generator.rb:11 def initialize(hash_digest_class: T.unsafe(nil)); end @@ -22218,8 +20478,6 @@ class ActiveRecord::Encryption::KeyGenerator # pkg:gem/activerecord#lib/active_record/encryption/key_generator.rb:16 def generate_random_key(length: T.unsafe(nil)); end - # Returns the value of attribute hash_digest_class. - # # pkg:gem/activerecord#lib/active_record/encryption/key_generator.rb:9 def hash_digest_class; end @@ -22240,8 +20498,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/key_provider.rb:10 class ActiveRecord::Encryption::KeyProvider - # @return [KeyProvider] a new instance of KeyProvider - # # pkg:gem/activerecord#lib/active_record/encryption/key_provider.rb:11 def initialize(keys); end @@ -22277,35 +20533,21 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/message.rb:11 class ActiveRecord::Encryption::Message - # @return [Message] a new instance of Message - # # pkg:gem/activerecord#lib/active_record/encryption/message.rb:14 def initialize(payload: T.unsafe(nil), headers: T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/encryption/message.rb:21 def ==(other_message); end - # Returns the value of attribute headers. - # # pkg:gem/activerecord#lib/active_record/encryption/message.rb:12 def headers; end - # Sets the attribute headers - # - # @param value the value to set the attribute headers to. - # # pkg:gem/activerecord#lib/active_record/encryption/message.rb:12 def headers=(_arg0); end - # Returns the value of attribute payload. - # # pkg:gem/activerecord#lib/active_record/encryption/message.rb:12 def payload; end - # Sets the attribute payload - # - # @param value the value to set the attribute payload to. - # # pkg:gem/activerecord#lib/active_record/encryption/message.rb:12 def payload=(_arg0); end @@ -22334,13 +20576,9 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/message_serializer.rb:23 class ActiveRecord::Encryption::MessageSerializer - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/message_serializer.rb:36 def binary?; end - # @raise [ActiveRecord::Encryption::Errors::ForbiddenClass] - # # pkg:gem/activerecord#lib/active_record/encryption/message_serializer.rb:31 def dump(message); end @@ -22376,8 +20614,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/null_encryptor.rb:7 class ActiveRecord::Encryption::NullEncryptor - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/null_encryptor.rb:20 def binary?; end @@ -22387,8 +20623,6 @@ class ActiveRecord::Encryption::NullEncryptor # pkg:gem/activerecord#lib/active_record/encryption/null_encryptor.rb:8 def encrypt(clean_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/null_encryptor.rb:16 def encrypted?(text); end end @@ -22407,8 +20641,6 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/properties.rb:16 class ActiveRecord::Encryption::Properties - # @return [Properties] a new instance of Properties - # # pkg:gem/activerecord#lib/active_record/encryption/properties.rb:42 def initialize(initial_properties = T.unsafe(nil)); end @@ -22422,8 +20654,6 @@ class ActiveRecord::Encryption::Properties # # It will raise an +EncryptedContentIntegrity+ if the value exists # - # @raise [Errors::EncryptedContentIntegrity] - # # pkg:gem/activerecord#lib/active_record/encryption/properties.rb:50 def []=(key, value); end @@ -22483,8 +20713,6 @@ class ActiveRecord::Encryption::Properties private - # Returns the value of attribute data. - # # pkg:gem/activerecord#lib/active_record/encryption/properties.rb:73 def data; end @@ -22508,21 +20736,15 @@ ActiveRecord::Encryption::Properties::DEFAULT_PROPERTIES = T.let(T.unsafe(nil), # # pkg:gem/activerecord#lib/active_record/encryption/read_only_null_encryptor.rb:10 class ActiveRecord::Encryption::ReadOnlyNullEncryptor - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/read_only_null_encryptor.rb:23 def binary?; end # pkg:gem/activerecord#lib/active_record/encryption/read_only_null_encryptor.rb:15 def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - # @raise [Errors::Encryption] - # # pkg:gem/activerecord#lib/active_record/encryption/read_only_null_encryptor.rb:11 def encrypt(clean_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/read_only_null_encryptor.rb:19 def encrypted?(text); end end @@ -22535,33 +20757,21 @@ end # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:10 class ActiveRecord::Encryption::Scheme - # @return [Scheme] a new instance of Scheme - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:13 def initialize(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous_schemes: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:78 def compatible_with?(other_scheme); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:44 def deterministic?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:40 def downcase?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:52 def fixed?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:36 def ignore_case?; end @@ -22571,20 +20781,12 @@ class ActiveRecord::Encryption::Scheme # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:61 def merge(other_scheme); end - # Returns the value of attribute previous_schemes. - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:11 def previous_schemes; end - # Sets the attribute previous_schemes - # - # @param value the value to set the attribute previous_schemes to. - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:11 def previous_schemes=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:48 def support_unencrypted_data?; end @@ -22605,8 +20807,6 @@ class ActiveRecord::Encryption::Scheme # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:90 def key_provider_from_key; end - # @raise [Errors::Configuration] - # # pkg:gem/activerecord#lib/active_record/encryption/scheme.rb:83 def validate_config!; end end @@ -22799,8 +20999,6 @@ module ActiveRecord::Enum # pkg:gem/activerecord#lib/active_record/enum.rb:290 def inherited(base); end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/enum.rb:405 def raise_conflict_error(enum_name, method_name, type, source: T.unsafe(nil)); end @@ -22815,8 +21013,6 @@ ActiveRecord::Enum::ENUM_CONFLICT_MESSAGE = T.let(T.unsafe(nil), String) # pkg:gem/activerecord#lib/active_record/enum.rb:295 class ActiveRecord::Enum::EnumMethods < ::Module - # @return [EnumMethods] a new instance of EnumMethods - # # pkg:gem/activerecord#lib/active_record/enum.rb:296 def initialize(klass); end @@ -22825,16 +21021,12 @@ class ActiveRecord::Enum::EnumMethods < ::Module # pkg:gem/activerecord#lib/active_record/enum.rb:303 def define_enum_methods(name, value_method_name, value, scopes, instance_methods); end - # Returns the value of attribute klass. - # # pkg:gem/activerecord#lib/active_record/enum.rb:301 def klass; end end # pkg:gem/activerecord#lib/active_record/enum.rb:171 class ActiveRecord::Enum::EnumType < ::ActiveModel::Type::Value - # @return [EnumType] a new instance of EnumType - # # pkg:gem/activerecord#lib/active_record/enum.rb:174 def initialize(name, mapping, subtype, raise_on_invalid_values: T.unsafe(nil)); end @@ -22847,16 +21039,12 @@ class ActiveRecord::Enum::EnumType < ::ActiveModel::Type::Value # pkg:gem/activerecord#lib/active_record/enum.rb:191 def deserialize(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/enum.rb:199 def serializable?(value, &block); end # pkg:gem/activerecord#lib/active_record/enum.rb:195 def serialize(value); end - # Returns the value of attribute subtype. - # # pkg:gem/activerecord#lib/active_record/enum.rb:211 def subtype; end @@ -22865,29 +21053,21 @@ class ActiveRecord::Enum::EnumType < ::ActiveModel::Type::Value private - # Returns the value of attribute mapping. - # # pkg:gem/activerecord#lib/active_record/enum.rb:214 def mapping; end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/enum.rb:214 def name; end end # pkg:gem/activerecord#lib/active_record/migration.rb:215 class ActiveRecord::EnvironmentMismatchError < ::ActiveRecord::ActiveRecordError - # @return [EnvironmentMismatchError] a new instance of EnvironmentMismatchError - # # pkg:gem/activerecord#lib/active_record/migration.rb:216 def initialize(current: T.unsafe(nil), stored: T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/migration.rb:229 class ActiveRecord::EnvironmentStorageError < ::ActiveRecord::ActiveRecordError - # @return [EnvironmentStorageError] a new instance of EnvironmentStorageError - # # pkg:gem/activerecord#lib/active_record/migration.rb:230 def initialize; end end @@ -22936,30 +21116,18 @@ end # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:10 class ActiveRecord::ExplainRegistry - # @return [ExplainRegistry] a new instance of ExplainRegistry - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:68 def initialize; end - # Returns the value of attribute collect. - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:65 def collect; end - # Sets the attribute collect - # - # @param value the value to set the attribute collect to. - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:65 def collect=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:77 def collect?; end - # Returns the value of attribute queries. - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:66 def queries; end @@ -23000,13 +21168,9 @@ class ActiveRecord::ExplainRegistry::Subscriber # pkg:gem/activerecord#lib/active_record/explain_registry.rb:31 def finish(name, id, payload); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:48 def ignore_payload?(payload); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/explain_registry.rb:37 def silenced?(_name); end @@ -23036,8 +21200,6 @@ ActiveRecord::ExplainRegistry::Subscriber::MUTEX = T.let(T.unsafe(nil), Thread:: # pkg:gem/activerecord#lib/active_record/filter_attribute_handler.rb:4 class ActiveRecord::FilterAttributeHandler - # @return [FilterAttributeHandler] a new instance of FilterAttributeHandler - # # pkg:gem/activerecord#lib/active_record/filter_attribute_handler.rb:18 def initialize(app); end @@ -23046,8 +21208,6 @@ class ActiveRecord::FilterAttributeHandler private - # Returns the value of attribute app. - # # pkg:gem/activerecord#lib/active_record/filter_attribute_handler.rb:32 def app; end @@ -23063,8 +21223,6 @@ class ActiveRecord::FilterAttributeHandler # pkg:gem/activerecord#lib/active_record/filter_attribute_handler.rb:58 def collect_for_later(klass, list); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/filter_attribute_handler.rb:54 def collecting?; end @@ -23111,8 +21269,6 @@ module ActiveRecord::FinderMethods # Person.exists? # Person.where(name: 'Spartacus', rating: 4).exists? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:357 def exists?(conditions = T.unsafe(nil)); end @@ -23308,8 +21464,6 @@ module ActiveRecord::FinderMethods # compared to the records in memory. If the relation is unloaded, an # efficient existence query is performed, as in #exists?. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:389 def include?(record); end @@ -23338,14 +21492,6 @@ module ActiveRecord::FinderMethods # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:213 def last!; end - # Returns true if the relation contains the given record or false otherwise. - # - # No query is performed if the relation is loaded; the given record is - # compared to the records in memory. If the relation is unloaded, an - # efficient existence query is performed, as in #exists?. - # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:407 def member?(record); end @@ -23489,16 +21635,12 @@ module ActiveRecord::FinderMethods # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:591 def find_take_with_limit(limit); end - # @raise [UnknownPrimaryKey] - # # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:492 def find_with_ids(*ids); end # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:641 def ordered_relation; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/finder_methods.rb:488 def using_limitable_reflections?(reflections); end end @@ -23510,8 +21652,6 @@ ActiveRecord::FinderMethods::ONE_AS_ONE = T.let(T.unsafe(nil), String) class ActiveRecord::Fixture include ::Enumerable - # @return [Fixture] a new instance of Fixture - # # pkg:gem/activerecord#lib/active_record/fixtures.rb:817 def initialize(fixture, model_class); end @@ -23524,23 +21664,15 @@ class ActiveRecord::Fixture # pkg:gem/activerecord#lib/active_record/fixtures.rb:826 def each(&block); end - # @raise [FixtureClassNotFound] - # # pkg:gem/activerecord#lib/active_record/fixtures.rb:836 def find; end - # Returns the value of attribute fixture. - # # pkg:gem/activerecord#lib/active_record/fixtures.rb:815 def fixture; end - # Returns the value of attribute model_class. - # # pkg:gem/activerecord#lib/active_record/fixtures.rb:815 def model_class; end - # Returns the value of attribute fixture. - # # pkg:gem/activerecord#lib/active_record/fixtures.rb:834 def to_hash; end end @@ -23556,16 +21688,12 @@ class ActiveRecord::FixtureClassNotFound < ::ActiveRecord::ActiveRecordError; en # pkg:gem/activerecord#lib/active_record/future_result.rb:4 class ActiveRecord::FutureResult - # @return [FutureResult] a new instance of FutureResult - # # pkg:gem/activerecord#lib/active_record/future_result.rb:66 def initialize(pool, *args, **kwargs); end # pkg:gem/activerecord#lib/active_record/future_result.rb:94 def cancel; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/future_result.rb:139 def canceled?; end @@ -23578,13 +21706,9 @@ class ActiveRecord::FutureResult # pkg:gem/activerecord#lib/active_record/future_result.rb:100 def execute_or_skip; end - # Returns the value of attribute lock_wait. - # # pkg:gem/activerecord#lib/active_record/future_result.rb:64 def lock_wait; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/future_result.rb:135 def pending?; end @@ -23622,26 +21746,18 @@ class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; # pkg:gem/activerecord#lib/active_record/future_result.rb:5 class ActiveRecord::FutureResult::Complete - # @return [Complete] a new instance of Complete - # # pkg:gem/activerecord#lib/active_record/future_result.rb:9 def initialize(result); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/future_result.rb:17 def canceled?; end # pkg:gem/activerecord#lib/active_record/future_result.rb:7 def empty?(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/future_result.rb:13 def pending?; end - # Returns the value of attribute result. - # # pkg:gem/activerecord#lib/active_record/future_result.rb:6 def result; end @@ -23654,8 +21770,6 @@ end # pkg:gem/activerecord#lib/active_record/future_result.rb:26 class ActiveRecord::FutureResult::EventBuffer - # @return [EventBuffer] a new instance of EventBuffer - # # pkg:gem/activerecord#lib/active_record/future_result.rb:27 def initialize(future_result, instrumenter); end @@ -23678,45 +21792,33 @@ end class ActiveRecord::HasManyThroughAssociationNotFoundError < ::ActiveRecord::ActiveRecordError include ::DidYouMean::Correctable - # @return [HasManyThroughAssociationNotFoundError] a new instance of HasManyThroughAssociationNotFoundError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:77 def initialize(owner_class = T.unsafe(nil), reflection = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:90 def corrections; end - # Returns the value of attribute owner_class. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:75 def owner_class; end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:75 def reflection; end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:124 class ActiveRecord::HasManyThroughAssociationPointlessSourceTypeError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughAssociationPointlessSourceTypeError] a new instance of HasManyThroughAssociationPointlessSourceTypeError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:125 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), source_reflection = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:104 class ActiveRecord::HasManyThroughAssociationPolymorphicSourceError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughAssociationPolymorphicSourceError] a new instance of HasManyThroughAssociationPolymorphicSourceError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:105 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), source_reflection = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:114 class ActiveRecord::HasManyThroughAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughAssociationPolymorphicThroughError] a new instance of HasManyThroughAssociationPolymorphicThroughError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:115 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end end @@ -23729,32 +21831,24 @@ class ActiveRecord::HasManyThroughNestedAssociationsAreReadonly < ::ActiveRecord # pkg:gem/activerecord#lib/active_record/associations/errors.rb:167 class ActiveRecord::HasManyThroughOrderError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughOrderError] a new instance of HasManyThroughOrderError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:168 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), through_reflection = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:154 class ActiveRecord::HasManyThroughSourceAssociationNotFoundError < ::ActiveRecord::ActiveRecordError - # @return [HasManyThroughSourceAssociationNotFoundError] a new instance of HasManyThroughSourceAssociationNotFoundError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:155 def initialize(reflection = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:144 class ActiveRecord::HasOneAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError - # @return [HasOneAssociationPolymorphicThroughError] a new instance of HasOneAssociationPolymorphicThroughError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:145 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:134 class ActiveRecord::HasOneThroughCantAssociateThroughCollection < ::ActiveRecord::ActiveRecordError - # @return [HasOneThroughCantAssociateThroughCollection] a new instance of HasOneThroughCantAssociateThroughCollection - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:135 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), through_reflection = T.unsafe(nil)); end end @@ -23767,8 +21861,6 @@ class ActiveRecord::HasOneThroughNestedAssociationsAreReadonly < ::ActiveRecord: # pkg:gem/activerecord#lib/active_record/migration.rb:121 class ActiveRecord::IllegalMigrationNameError < ::ActiveRecord::MigrationError - # @return [IllegalMigrationNameError] a new instance of IllegalMigrationNameError - # # pkg:gem/activerecord#lib/active_record/migration.rb:122 def initialize(name = T.unsafe(nil)); end end @@ -23940,8 +22032,6 @@ module ActiveRecord::Inheritance::ClassMethods # Returns whether this class is an abstract class or not. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/inheritance.rb:167 def abstract_class?; end @@ -23970,24 +22060,18 @@ module ActiveRecord::Inheritance::ClassMethods # Returns whether the class is a base class. # See #base_class for more information. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/inheritance.rb:119 def base_class?; end # Returns +true+ if this does not need STI type condition. Returns # +false+ if STI type condition needs to be applied. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/inheritance.rb:82 def descends_from_active_record?; end # pkg:gem/activerecord#lib/active_record/inheritance.rb:226 def dup; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/inheritance.rb:92 def finder_needs_type_condition?; end @@ -24070,34 +22154,24 @@ module ActiveRecord::Inheritance::ClassMethods # pkg:gem/activerecord#lib/active_record/inheritance.rb:322 def type_condition(table = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/inheritance.rb:307 def using_single_table_inheritance?(record); end end # pkg:gem/activerecord#lib/active_record/insert_all.rb:6 class ActiveRecord::InsertAll - # @return [InsertAll] a new instance of InsertAll - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:18 def initialize(relation, connection, inserts, on_duplicate:, update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - # Returns the value of attribute connection. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:7 def connection; end # pkg:gem/activerecord#lib/active_record/insert_all.rb:48 def execute; end - # Returns the value of attribute inserts. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:7 def inserts; end - # Returns the value of attribute keys. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:7 def keys; end @@ -24109,54 +22183,36 @@ class ActiveRecord::InsertAll # pkg:gem/activerecord#lib/active_record/insert_all.rb:73 def map_key_with_value; end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:7 def model; end - # Returns the value of attribute on_duplicate. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:8 def on_duplicate; end # pkg:gem/activerecord#lib/active_record/insert_all.rb:61 def primary_keys; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:87 def record_timestamps?; end - # Returns the value of attribute returning. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:8 def returning; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:65 def skip_duplicates?; end - # Returns the value of attribute unique_by. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:8 def unique_by; end # pkg:gem/activerecord#lib/active_record/insert_all.rb:57 def updatable_columns; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:69 def update_duplicates?; end - # Returns the value of attribute update_only. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:8 def update_only; end - # Returns the value of attribute update_sql. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:8 def update_sql; end @@ -24165,13 +22221,9 @@ class ActiveRecord::InsertAll # pkg:gem/activerecord#lib/active_record/insert_all.rb:129 def configure_on_duplicate_update_logic; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:145 def custom_update_sql_provided?; end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:212 def disallow_raw_sql!(value); end @@ -24181,8 +22233,6 @@ class ActiveRecord::InsertAll # pkg:gem/activerecord#lib/active_record/insert_all.rb:149 def find_unique_index_for(unique_by); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:101 def has_attribute_aliases?(attributes); end @@ -24221,8 +22271,6 @@ end # pkg:gem/activerecord#lib/active_record/insert_all.rb:225 class ActiveRecord::InsertAll::Builder - # @return [Builder] a new instance of Builder - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:230 def initialize(insert_all); end @@ -24238,8 +22286,6 @@ class ActiveRecord::InsertAll::Builder # pkg:gem/activerecord#lib/active_record/insert_all.rb:228 def keys_including_timestamps(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:226 def model; end @@ -24278,21 +22324,15 @@ class ActiveRecord::InsertAll::Builder # pkg:gem/activerecord#lib/active_record/insert_all.rb:307 def columns_list; end - # Returns the value of attribute connection. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:301 def connection; end - # @raise [UnknownAttributeError] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:311 def extract_types_for(keys); end # pkg:gem/activerecord#lib/active_record/insert_all.rb:320 def format_columns(columns); end - # Returns the value of attribute insert_all. - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:301 def insert_all; end @@ -24302,8 +22342,6 @@ class ActiveRecord::InsertAll::Builder # pkg:gem/activerecord#lib/active_record/insert_all.rb:324 def quote_columns(columns); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/insert_all.rb:303 def touch_timestamp_attribute?(column_name); end end @@ -24383,8 +22421,6 @@ module ActiveRecord::Integration # or if the timezone is not set to UTC then # we cannot apply our transformations correctly. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/integration.rb:178 def can_use_fast_cache_version?(timestamp); end @@ -24468,8 +22504,6 @@ end # # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:12 class ActiveRecord::InternalMetadata - # @return [InternalMetadata] a new instance of InternalMetadata - # # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:18 def initialize(pool); end @@ -24479,8 +22513,6 @@ class ActiveRecord::InternalMetadata # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:39 def []=(key, value); end - # Returns the value of attribute arel_table. - # # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:16 def arel_table; end @@ -24501,16 +22533,12 @@ class ActiveRecord::InternalMetadata # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:99 def drop_table; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:35 def enabled?; end # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:23 def primary_key; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/internal_metadata.rb:107 def table_exists?; end @@ -24549,8 +22577,6 @@ class ActiveRecord::InvalidForeignKey < ::ActiveRecord::WrappedDatabaseException # pkg:gem/activerecord#lib/active_record/migration.rb:131 class ActiveRecord::InvalidMigrationTimestampError < ::ActiveRecord::MigrationError - # @return [InvalidMigrationTimestampError] a new instance of InvalidMigrationTimestampError - # # pkg:gem/activerecord#lib/active_record/migration.rb:132 def initialize(version = T.unsafe(nil), name = T.unsafe(nil)); end end @@ -24559,34 +22585,24 @@ end class ActiveRecord::InverseOfAssociationNotFoundError < ::ActiveRecord::ActiveRecordError include ::DidYouMean::Correctable - # @return [InverseOfAssociationNotFoundError] a new instance of InverseOfAssociationNotFoundError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:36 def initialize(reflection = T.unsafe(nil), associated_class = T.unsafe(nil)); end - # Returns the value of attribute associated_class. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:34 def associated_class; end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:49 def corrections; end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:34 def reflection; end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:62 class ActiveRecord::InverseOfAssociationRecursiveError < ::ActiveRecord::ActiveRecordError - # @return [InverseOfAssociationRecursiveError] a new instance of InverseOfAssociationRecursiveError - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:64 def initialize(reflection = T.unsafe(nil)); end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:63 def reflection; end end @@ -24772,8 +22788,6 @@ module ActiveRecord::Locking::Optimistic # pkg:gem/activerecord#lib/active_record/locking/optimistic.rb:63 def increment!(*_arg0, **_arg1); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/locking/optimistic.rb:59 def locking_enabled?; end @@ -24831,8 +22845,6 @@ module ActiveRecord::Locking::Optimistic::ClassMethods # (which it is, by default) and the table includes the # +locking_column+ column (defaults to +lock_version+). # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/locking/optimistic.rb:167 def locking_enabled?; end @@ -25019,8 +23031,6 @@ ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES = T.let(T.unsafe(nil), Array) # pkg:gem/activerecord#lib/active_record/marshalling.rb:4 module ActiveRecord::Marshalling class << self - # Returns the value of attribute format_version. - # # pkg:gem/activerecord#lib/active_record/marshalling.rb:8 def format_version; end @@ -25090,8 +23100,6 @@ end # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver/session.rb:5 class ActiveRecord::Middleware::DatabaseSelector - # @return [DatabaseSelector] a new instance of DatabaseSelector - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector.rb:52 def initialize(app, resolver_klass = T.unsafe(nil), context_klass = T.unsafe(nil), options = T.unsafe(nil)); end @@ -25101,18 +23109,12 @@ class ActiveRecord::Middleware::DatabaseSelector # pkg:gem/activerecord#lib/active_record/middleware/database_selector.rb:63 def call(env); end - # Returns the value of attribute context_klass. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector.rb:59 def context_klass; end - # Returns the value of attribute options. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector.rb:59 def options; end - # Returns the value of attribute resolver_klass. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector.rb:59 def resolver_klass; end @@ -25135,31 +23137,21 @@ end # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver/session.rb:6 class ActiveRecord::Middleware::DatabaseSelector::Resolver - # @return [Resolver] a new instance of Resolver - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:26 def initialize(context, options = T.unsafe(nil)); end - # Returns the value of attribute context. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:33 def context; end - # Returns the value of attribute delay. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:33 def delay; end - # Returns the value of attribute instrumenter. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:33 def instrumenter; end # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:35 def read(&blk); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:51 def reading_request?(request); end @@ -25174,8 +23166,6 @@ class ActiveRecord::Middleware::DatabaseSelector::Resolver # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:56 def read_from_primary(&blk); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:78 def read_from_primary?; end @@ -25185,8 +23175,6 @@ class ActiveRecord::Middleware::DatabaseSelector::Resolver # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:82 def send_to_replica_delay; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver.rb:86 def time_since_last_write_ok?; end @@ -25210,8 +23198,6 @@ ActiveRecord::Middleware::DatabaseSelector::Resolver::SEND_TO_REPLICA_DELAY = T. # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver/session.rb:12 class ActiveRecord::Middleware::DatabaseSelector::Resolver::Session - # @return [Session] a new instance of Session - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver/session.rb:28 def initialize(session); end @@ -25221,8 +23207,6 @@ class ActiveRecord::Middleware::DatabaseSelector::Resolver::Session # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver/session.rb:42 def save(response); end - # Returns the value of attribute session. - # # pkg:gem/activerecord#lib/active_record/middleware/database_selector/resolver/session.rb:32 def session; end @@ -25289,21 +23273,15 @@ end # # pkg:gem/activerecord#lib/active_record/middleware/shard_selector.rb:46 class ActiveRecord::Middleware::ShardSelector - # @return [ShardSelector] a new instance of ShardSelector - # # pkg:gem/activerecord#lib/active_record/middleware/shard_selector.rb:47 def initialize(app, resolver, options = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/middleware/shard_selector.rb:55 def call(env); end - # Returns the value of attribute options. - # # pkg:gem/activerecord#lib/active_record/middleware/shard_selector.rb:53 def options; end - # Returns the value of attribute resolver. - # # pkg:gem/activerecord#lib/active_record/middleware/shard_selector.rb:53 def resolver; end @@ -25652,8 +23630,6 @@ end # # pkg:gem/activerecord#lib/active_record/migration.rb:570 class ActiveRecord::Migration - # @return [Migration] a new instance of Migration - # # pkg:gem/activerecord#lib/active_record/migration.rb:805 def initialize(name = T.unsafe(nil), version = T.unsafe(nil)); end @@ -25689,15 +23665,9 @@ class ActiveRecord::Migration # pkg:gem/activerecord#lib/active_record/migration.rb:969 def migrate(direction); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/migration.rb:803 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activerecord#lib/active_record/migration.rb:803 def name=(_arg0); end @@ -25784,8 +23754,6 @@ class ActiveRecord::Migration # pkg:gem/activerecord#lib/active_record/migration.rb:857 def revert(*migration_classes, &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:874 def reverting?; end @@ -25842,27 +23810,15 @@ class ActiveRecord::Migration # pkg:gem/activerecord#lib/active_record/migration.rb:933 def up_only(&block); end - # :singleton-method: verbose - # - # Specifies if migrations will write the actions they are taking to the console as they - # happen, along with benchmarks describing how long each step took. Defaults to - # true. - # # pkg:gem/activerecord#lib/active_record/migration.rb:802 def verbose; end # pkg:gem/activerecord#lib/active_record/migration.rb:802 def verbose=(val); end - # Returns the value of attribute version. - # # pkg:gem/activerecord#lib/active_record/migration.rb:803 def version; end - # Sets the attribute version - # - # @param value the value to set the attribute version to. - # # pkg:gem/activerecord#lib/active_record/migration.rb:803 def version=(_arg0); end @@ -25880,13 +23836,9 @@ class ActiveRecord::Migration # pkg:gem/activerecord#lib/active_record/migration.rb:1159 def format_arguments(arguments); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1171 def internal_option?(option_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1179 def respond_to_missing?(method, include_private = T.unsafe(nil)); end @@ -25944,8 +23896,6 @@ class ActiveRecord::Migration # pkg:gem/activerecord#lib/active_record/migration.rb:687 def nearest_delegate; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:639 def valid_version_format?(version_string); end @@ -25957,8 +23907,6 @@ class ActiveRecord::Migration private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:748 def any_schema_needs_update?; end @@ -25974,8 +23922,6 @@ class ActiveRecord::Migration # pkg:gem/activerecord#lib/active_record/migration.rb:758 def pending_migrations; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:786 def respond_to_missing?(method, include_private = T.unsafe(nil)); end end @@ -25986,8 +23932,6 @@ end # # pkg:gem/activerecord#lib/active_record/migration.rb:648 class ActiveRecord::Migration::CheckPending - # @return [CheckPending] a new instance of CheckPending - # # pkg:gem/activerecord#lib/active_record/migration.rb:649 def initialize(app, file_watcher: T.unsafe(nil)); end @@ -26050,8 +23994,6 @@ class ActiveRecord::Migration::CommandRecorder include ::ActiveRecord::Migration::JoinTable include ::ActiveRecord::Migration::CommandRecorder::StraightReversions - # @return [CommandRecorder] a new instance of CommandRecorder - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:70 def initialize(delegate = T.unsafe(nil)); end @@ -26103,15 +24045,9 @@ class ActiveRecord::Migration::CommandRecorder # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:129 def change_table_comment(*args, **_arg1, &block); end - # Returns the value of attribute commands. - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:68 def commands; end - # Sets the attribute commands - # - # @param value the value to set the attribute commands to. - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:68 def commands=(_arg0); end @@ -26130,15 +24066,9 @@ class ActiveRecord::Migration::CommandRecorder # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:129 def create_virtual_table(*args, **_arg1, &block); end - # Returns the value of attribute delegate. - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:68 def delegate; end - # Sets the attribute delegate - # - # @param value the value to set the attribute delegate to. - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:68 def delegate=(_arg0); end @@ -26188,8 +24118,6 @@ class ActiveRecord::Migration::CommandRecorder # This method will raise an +IrreversibleMigration+ exception if it cannot # invert the +command+. # - # @raise [IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:117 def inverse_of(command, args, &block); end @@ -26266,15 +24194,9 @@ class ActiveRecord::Migration::CommandRecorder # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:83 def revert; end - # Returns the value of attribute reverting. - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:68 def reverting; end - # Sets the attribute reverting - # - # @param value the value to set the attribute reverting to. - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:68 def reverting=(_arg0); end @@ -26289,8 +24211,6 @@ class ActiveRecord::Migration::CommandRecorder # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:300 def invert_add_foreign_key(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:361 def invert_add_unique_constraint(args); end @@ -26312,50 +24232,36 @@ class ActiveRecord::Migration::CommandRecorder # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:194 def invert_disable_index(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:375 def invert_drop_enum(args); end # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:217 def invert_drop_table(args, &block); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:402 def invert_drop_virtual_table(args); end # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:189 def invert_enable_index(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:347 def invert_remove_check_constraint(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:241 def invert_remove_column(args); end # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:246 def invert_remove_columns(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:356 def invert_remove_exclusion_constraint(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:305 def invert_remove_foreign_key(args); end # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:264 def invert_remove_index(args); end - # @raise [ActiveRecord::IrreversibleMigration] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:368 def invert_remove_unique_constraint(args); end @@ -26382,8 +24288,6 @@ class ActiveRecord::Migration::CommandRecorder # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:413 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration/command_recorder.rb:408 def respond_to_missing?(method, _); end end @@ -26500,8 +24404,6 @@ class ActiveRecord::Migration::Compatibility::V4_2 < ::ActiveRecord::Migration:: # pkg:gem/activerecord#lib/active_record/migration/compatibility.rb:452 def add_timestamps(table_name, **options); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration/compatibility.rb:457 def index_exists?(table_name, column_name = T.unsafe(nil), **options); end @@ -26746,8 +24648,6 @@ end module ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration/compatibility.rb:89 def expression_column_name?(column_name); end @@ -26854,8 +24754,6 @@ end # # pkg:gem/activerecord#lib/active_record/migration/default_schema_versions_formatter.rb:8 class ActiveRecord::Migration::DefaultSchemaVersionsFormatter - # @return [DefaultSchemaVersionsFormatter] a new instance of DefaultSchemaVersionsFormatter - # # pkg:gem/activerecord#lib/active_record/migration/default_schema_versions_formatter.rb:9 def initialize(connection); end @@ -26864,8 +24762,6 @@ class ActiveRecord::Migration::DefaultSchemaVersionsFormatter private - # Returns the value of attribute connection. - # # pkg:gem/activerecord#lib/active_record/migration/default_schema_versions_formatter.rb:27 def connection; end end @@ -26883,8 +24779,6 @@ class ActiveRecord::Migration::DefaultStrategy < ::ActiveRecord::Migration::Exec # pkg:gem/activerecord#lib/active_record/migration/default_strategy.rb:9 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration/default_strategy.rb:13 def respond_to_missing?(method, include_private = T.unsafe(nil)); end end @@ -26897,15 +24791,11 @@ end # # pkg:gem/activerecord#lib/active_record/migration/execution_strategy.rb:10 class ActiveRecord::Migration::ExecutionStrategy - # @return [ExecutionStrategy] a new instance of ExecutionStrategy - # # pkg:gem/activerecord#lib/active_record/migration/execution_strategy.rb:11 def initialize(migration); end private - # Returns the value of attribute migration. - # # pkg:gem/activerecord#lib/active_record/migration/execution_strategy.rb:16 def migration; end end @@ -26929,18 +24819,9 @@ class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct # pkg:gem/activerecord#lib/active_record/migration.rb:883 def down; end - # Returns the value of attribute reverting - # - # @return [Object] the current value of reverting - # # pkg:gem/activerecord#lib/active_record/migration.rb:878 def reverting; end - # Sets the attribute reverting - # - # @param value [Object] the value to set the attribute reverting to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/migration.rb:878 def reverting=(_); end @@ -26977,8 +24858,6 @@ end # # pkg:gem/activerecord#lib/active_record/migration.rb:1220 class ActiveRecord::MigrationContext - # @return [MigrationContext] a new instance of MigrationContext - # # pkg:gem/activerecord#lib/active_record/migration.rb:1223 def initialize(migrations_paths, schema_migration = T.unsafe(nil), internal_metadata = T.unsafe(nil)); end @@ -26997,13 +24876,9 @@ class ActiveRecord::MigrationContext # pkg:gem/activerecord#lib/active_record/migration.rb:1291 def get_all_versions; end - # Returns the value of attribute internal_metadata. - # # pkg:gem/activerecord#lib/active_record/migration.rb:1221 def internal_metadata; end - # @raise [NoEnvironmentInSchemaError] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1357 def last_stored_environment; end @@ -27027,16 +24902,12 @@ class ActiveRecord::MigrationContext # pkg:gem/activerecord#lib/active_record/migration.rb:1312 def migrations; end - # Returns the value of attribute migrations_paths. - # # pkg:gem/activerecord#lib/active_record/migration.rb:1221 def migrations_paths; end # pkg:gem/activerecord#lib/active_record/migration.rb:1328 def migrations_status; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1304 def needs_migration?; end @@ -27046,8 +24917,6 @@ class ActiveRecord::MigrationContext # pkg:gem/activerecord#lib/active_record/migration.rb:1308 def pending_migration_versions; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1353 def protected_environment?; end @@ -27057,8 +24926,6 @@ class ActiveRecord::MigrationContext # pkg:gem/activerecord#lib/active_record/migration.rb:1283 def run(direction, target_version); end - # Returns the value of attribute schema_migration. - # # pkg:gem/activerecord#lib/active_record/migration.rb:1221 def schema_migration; end @@ -27082,21 +24949,15 @@ class ActiveRecord::MigrationContext # pkg:gem/activerecord#lib/active_record/migration.rb:1382 def parse_migration_filename(filename); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1390 def valid_migration_timestamp?(version); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1386 def validate_timestamp?; end end # pkg:gem/activerecord#lib/active_record/migration.rb:10 class ActiveRecord::MigrationError < ::ActiveRecord::ActiveRecordError - # @return [MigrationError] a new instance of MigrationError - # # pkg:gem/activerecord#lib/active_record/migration.rb:11 def initialize(message = T.unsafe(nil)); end end @@ -27106,8 +24967,6 @@ end # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 class ActiveRecord::MigrationProxy < ::Struct - # @return [MigrationProxy] a new instance of MigrationProxy - # # pkg:gem/activerecord#lib/active_record/migration.rb:1187 def initialize(name, version, filename, scope); end @@ -27120,66 +24979,30 @@ class ActiveRecord::MigrationProxy < ::Struct # pkg:gem/activerecord#lib/active_record/migration.rb:1196 def disable_ddl_transaction(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute filename - # - # @return [Object] the current value of filename - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def filename; end - # Sets the attribute filename - # - # @param value [Object] the value to set the attribute filename to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def filename=(_); end # pkg:gem/activerecord#lib/active_record/migration.rb:1196 def migrate(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def name=(_); end - # Returns the value of attribute scope - # - # @return [Object] the current value of scope - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def scope; end - # Sets the attribute scope - # - # @param value [Object] the value to set the attribute scope to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def scope=(_); end - # Returns the value of attribute version - # - # @return [Object] the current value of version - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def version; end - # Sets the attribute version - # - # @param value [Object] the value to set the attribute version to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/migration.rb:1186 def version=(_); end @@ -27214,8 +25037,6 @@ end # pkg:gem/activerecord#lib/active_record/migration.rb:1414 class ActiveRecord::Migrator - # @return [Migrator] a new instance of Migrator - # # pkg:gem/activerecord#lib/active_record/migration.rb:1430 def initialize(direction, migrations, schema_migration, internal_metadata, target_version = T.unsafe(nil)); end @@ -27259,8 +25080,6 @@ class ActiveRecord::Migrator # pkg:gem/activerecord#lib/active_record/migration.rb:1594 def ddl_transaction(migration, &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1589 def down?; end @@ -27275,8 +25094,6 @@ class ActiveRecord::Migrator # Return true if a valid version is not provided. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1533 def invalid_target?; end @@ -27285,8 +25102,6 @@ class ActiveRecord::Migrator # pkg:gem/activerecord#lib/active_record/migration.rb:1512 def migrate_without_lock; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1528 def ran?(migration); end @@ -27300,8 +25115,6 @@ class ActiveRecord::Migrator # Used for running a specific migration. # - # @raise [UnknownMigrationVersionError] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1503 def run_without_lock; end @@ -27311,23 +25124,15 @@ class ActiveRecord::Migrator # pkg:gem/activerecord#lib/active_record/migration.rb:1555 def target; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1585 def up?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1606 def use_advisory_lock?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1602 def use_transaction?(migration); end - # @raise [DuplicateMigrationNameError] - # # pkg:gem/activerecord#lib/active_record/migration.rb:1567 def validate(migrations); end @@ -27340,15 +25145,9 @@ class ActiveRecord::Migrator # pkg:gem/activerecord#lib/active_record/migration.rb:1419 def current_version; end - # Returns the value of attribute migrations_paths. - # # pkg:gem/activerecord#lib/active_record/migration.rb:1416 def migrations_paths; end - # Sets the attribute migrations_paths - # - # @param value the value to set the attribute migrations_paths to. - # # pkg:gem/activerecord#lib/active_record/migration.rb:1416 def migrations_paths=(_arg0); end end @@ -27361,8 +25160,6 @@ ActiveRecord::Migrator::MIGRATOR_SALT = T.let(T.unsafe(nil), Integer) # # pkg:gem/activerecord#lib/active_record/errors.rb:237 class ActiveRecord::MismatchedForeignKey < ::ActiveRecord::StatementInvalid - # @return [MismatchedForeignKey] a new instance of MismatchedForeignKey - # # pkg:gem/activerecord#lib/active_record/errors.rb:238 def initialize(message: T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), table: T.unsafe(nil), foreign_key: T.unsafe(nil), target_table: T.unsafe(nil), primary_key: T.unsafe(nil), primary_key_column: T.unsafe(nil), query_parser: T.unsafe(nil), connection_pool: T.unsafe(nil)); end @@ -27559,8 +25356,6 @@ module ActiveRecord::ModelSchema::ClassMethods # Determines if the primary key values should be selected from their # corresponding sequence before the insert statement. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/model_schema.rb:421 def prefetch_primary_key?; end @@ -27647,8 +25442,6 @@ module ActiveRecord::ModelSchema::ClassMethods # Indicates whether the table associated with this class exists # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/model_schema.rb:432 def table_exists?; end @@ -27737,8 +25530,6 @@ module ActiveRecord::ModelSchema::ClassMethods private - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/model_schema.rb:654 def check_model_columns(columns_present); end @@ -27753,8 +25544,6 @@ module ActiveRecord::ModelSchema::ClassMethods # pkg:gem/activerecord#lib/active_record/model_schema.rb:604 def load_schema!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/model_schema.rb:600 def schema_loaded?; end @@ -27774,13 +25563,9 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:470 class ActiveRecord::MultiparameterAssignmentErrors < ::ActiveRecord::ActiveRecordError - # @return [MultiparameterAssignmentErrors] a new instance of MultiparameterAssignmentErrors - # # pkg:gem/activerecord#lib/active_record/errors.rb:473 def initialize(errors = T.unsafe(nil)); end - # Returns the value of attribute errors. - # # pkg:gem/activerecord#lib/active_record/errors.rb:471 def errors; end end @@ -27804,8 +25589,6 @@ module ActiveRecord::NestedAttributes private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/nested_attributes.rb:616 def allow_destroy?(association_name); end @@ -27887,13 +25670,9 @@ module ActiveRecord::NestedAttributes # Determines if a hash contains a truthy _destroy key. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/nested_attributes.rb:584 def has_destroy_flag?(hash); end - # @raise [RecordNotFound] - # # pkg:gem/activerecord#lib/active_record/nested_attributes.rb:620 def raise_nested_attributes_record_not_found!(association_name, record_id); end @@ -27901,15 +25680,11 @@ module ActiveRecord::NestedAttributes # has_destroy_flag? or if a :reject_if proc exists for this # association and evaluates to +true+. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/nested_attributes.rb:591 def reject_new_record?(association_name, attributes); end # Only take into account the destroy flag if :allow_destroy is true # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/nested_attributes.rb:612 def will_be_destroyed?(association_name, attributes); end @@ -28299,8 +26074,6 @@ class ActiveRecord::NoDatabaseError < ::ActiveRecord::StatementInvalid include ::ActiveSupport::ActionableError extend ::ActiveSupport::ActionableError::ClassMethods - # @return [NoDatabaseError] a new instance of NoDatabaseError - # # pkg:gem/activerecord#lib/active_record/errors.rb:342 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end @@ -28338,8 +26111,6 @@ end # pkg:gem/activerecord#lib/active_record/migration.rb:195 class ActiveRecord::NoEnvironmentInSchemaError < ::ActiveRecord::MigrationError - # @return [NoEnvironmentInSchemaError] a new instance of NoEnvironmentInSchemaError - # # pkg:gem/activerecord#lib/active_record/migration.rb:196 def initialize; end end @@ -28359,8 +26130,6 @@ module ActiveRecord::NoTouching # Message.first.no_touching? # false # end # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/no_touching.rb:53 def no_touching?; end @@ -28371,8 +26140,6 @@ module ActiveRecord::NoTouching def touch_later(*_arg0); end class << self - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/no_touching.rb:36 def applied_to?(klass); end @@ -28417,8 +26184,6 @@ class ActiveRecord::PendingMigrationConnection # pkg:gem/activerecord#lib/active_record/migration/pending_migration_connection.rb:17 def current_preventing_writes; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/migration/pending_migration_connection.rb:13 def primary_class?; end @@ -28432,8 +26197,6 @@ class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError include ::ActiveSupport::ActionableError extend ::ActiveSupport::ActionableError::ClassMethods - # @return [PendingMigrationError] a new instance of PendingMigrationError - # # pkg:gem/activerecord#lib/active_record/migration.rb:158 def initialize(message = T.unsafe(nil), pending_migrations: T.unsafe(nil)); end @@ -28567,8 +26330,6 @@ module ActiveRecord::Persistence # Returns true if this object has been destroyed, otherwise returns false. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:355 def destroyed?; end @@ -28590,24 +26351,18 @@ module ActiveRecord::Persistence # # Returns +self+. # - # @raise [ActiveRecordError] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:672 def increment!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end # Returns true if this object hasn't been saved yet -- that is, a record # for the object doesn't exist in the database yet; otherwise, returns false. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:338 def new_record?; end # Returns true if the record is persisted, i.e. it's not a new record and it was # not destroyed, otherwise returns false. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:361 def persisted?; end @@ -28615,15 +26370,11 @@ module ActiveRecord::Persistence # update or delete, the object didn't exist in the database and new_record? would have # returned true. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:345 def previously_new_record?; end # Returns true if this object was previously persisted but now it has been deleted. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:350 def previously_persisted?; end @@ -28878,8 +26629,6 @@ module ActiveRecord::Persistence # # Update with touch option. # user.update_columns(last_request_at: Time.current, touch: true) # - # @raise [ActiveRecordError] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:619 def update_columns(attributes); end @@ -28888,9 +26637,6 @@ module ActiveRecord::Persistence # Creates a record with values matching those of the instance attributes # and returns its id. # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on - # # pkg:gem/activerecord#lib/active_record/persistence.rb:951 def _create_record(attribute_names = T.unsafe(nil)); end @@ -28906,16 +26652,12 @@ module ActiveRecord::Persistence # pkg:gem/activerecord#lib/active_record/persistence.rb:883 def _query_constraints_hash; end - # @raise [ReadOnlyRecord] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:988 def _raise_readonly_record_error; end # pkg:gem/activerecord#lib/active_record/persistence.rb:980 def _raise_record_not_destroyed; end - # @raise [ActiveRecordError] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:992 def _raise_record_not_touched_error; end @@ -28925,17 +26667,12 @@ module ActiveRecord::Persistence # Updates the associated record with values matching those of the instance attributes. # Returns the number of affected rows. # - # @yield [_self] - # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on - # # pkg:gem/activerecord#lib/active_record/persistence.rb:931 def _update_record(attribute_names = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/persistence.rb:915 def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:878 def apply_scoping?(options); end @@ -28956,8 +26693,6 @@ module ActiveRecord::Persistence # pkg:gem/activerecord#lib/active_record/persistence.rb:851 def strict_loaded_associations; end - # @raise [ActiveRecordError] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:976 def verify_readonly_attribute(name); end end @@ -29043,8 +26778,6 @@ module ActiveRecord::Persistence::ClassMethods # pkg:gem/activerecord#lib/active_record/persistence.rb:50 def create!(attributes = T.unsafe(nil), &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:219 def has_query_constraints?; end @@ -29093,8 +26826,6 @@ module ActiveRecord::Persistence::ClassMethods # developer.reload # # SELECT "developers".* FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 LIMIT 1 # - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/persistence.rb:212 def query_constraints(*columns_list); end @@ -29168,8 +26899,6 @@ end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder.rb:4 class ActiveRecord::PredicateBuilder - # @return [PredicateBuilder] a new instance of PredicateBuilder - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder.rb:12 def initialize(table); end @@ -29211,10 +26940,6 @@ class ActiveRecord::PredicateBuilder # pkg:gem/activerecord#lib/active_record/relation/predicate_builder.rb:84 def expand_from_hash(attributes, &block); end - # Sets the attribute table - # - # @param value the value to set the attribute table to. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder.rb:82 def table=(_arg0); end @@ -29229,8 +26954,6 @@ class ActiveRecord::PredicateBuilder # pkg:gem/activerecord#lib/active_record/relation/predicate_builder.rb:187 def handler_for(object); end - # Returns the value of attribute table. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder.rb:153 def table; end @@ -29242,8 +26965,6 @@ end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/array_handler.rb:7 class ActiveRecord::PredicateBuilder::ArrayHandler - # @return [ArrayHandler] a new instance of ArrayHandler - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/array_handler.rb:8 def initialize(predicate_builder); end @@ -29252,8 +26973,6 @@ class ActiveRecord::PredicateBuilder::ArrayHandler private - # Returns the value of attribute predicate_builder. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/array_handler.rb:39 def predicate_builder; end end @@ -29268,8 +26987,6 @@ end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:5 class ActiveRecord::PredicateBuilder::AssociationQueryValue - # @return [AssociationQueryValue] a new instance of AssociationQueryValue - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:6 def initialize(reflection, value); end @@ -29284,8 +27001,6 @@ class ActiveRecord::PredicateBuilder::AssociationQueryValue # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:25 def ids; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:55 def polymorphic_clause?; end @@ -29298,26 +27013,18 @@ class ActiveRecord::PredicateBuilder::AssociationQueryValue # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:43 def primary_type; end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:23 def reflection; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:51 def select_clause?; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/association_query_value.rb:23 def value; end end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/basic_object_handler.rb:5 class ActiveRecord::PredicateBuilder::BasicObjectHandler - # @return [BasicObjectHandler] a new instance of BasicObjectHandler - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/basic_object_handler.rb:6 def initialize(predicate_builder); end @@ -29326,16 +27033,12 @@ class ActiveRecord::PredicateBuilder::BasicObjectHandler private - # Returns the value of attribute predicate_builder. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/basic_object_handler.rb:16 def predicate_builder; end end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/polymorphic_array_value.rb:5 class ActiveRecord::PredicateBuilder::PolymorphicArrayValue - # @return [PolymorphicArrayValue] a new instance of PolymorphicArrayValue - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/polymorphic_array_value.rb:6 def initialize(reflection, values); end @@ -29353,24 +27056,18 @@ class ActiveRecord::PredicateBuilder::PolymorphicArrayValue # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/polymorphic_array_value.rb:32 def primary_key(value); end - # Returns the value of attribute reflection. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/polymorphic_array_value.rb:23 def reflection; end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/polymorphic_array_value.rb:25 def type_to_ids_mapping; end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/polymorphic_array_value.rb:23 def values; end end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:5 class ActiveRecord::PredicateBuilder::RangeHandler - # @return [RangeHandler] a new instance of RangeHandler - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:8 def initialize(predicate_builder); end @@ -29379,48 +27076,24 @@ class ActiveRecord::PredicateBuilder::RangeHandler private - # Returns the value of attribute predicate_builder. - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:19 def predicate_builder; end end # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:6 class ActiveRecord::PredicateBuilder::RangeHandler::RangeWithBinds < ::Struct - # Returns the value of attribute begin - # - # @return [Object] the current value of begin - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:6 def begin; end - # Sets the attribute begin - # - # @param value [Object] the value to set the attribute begin to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:6 def begin=(_); end - # Returns the value of attribute end - # - # @return [Object] the current value of end - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:6 def end; end - # Sets the attribute end - # - # @param value [Object] the value to set the attribute end to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:6 def end=(_); end - # Returns the value of attribute exclude_end? - # - # @return [Object] the current value of exclude_end? - # # pkg:gem/activerecord#lib/active_record/relation/predicate_builder/range_handler.rb:6 def exclude_end?; end @@ -29467,8 +27140,6 @@ class ActiveRecord::PreparedStatementInvalid < ::ActiveRecord::ActiveRecordError # pkg:gem/activerecord#lib/active_record/promise.rb:4 class ActiveRecord::Promise < ::BasicObject - # @return [Promise] a new instance of Promise - # # pkg:gem/activerecord#lib/active_record/promise.rb:7 def initialize(future_result, block); end @@ -29483,8 +27154,6 @@ class ActiveRecord::Promise < ::BasicObject # Returns whether the associated query is still being executed or not. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/promise.rb:13 def pending?; end @@ -29518,21 +27187,15 @@ end # pkg:gem/activerecord#lib/active_record/promise.rb:63 class ActiveRecord::Promise::Complete < ::ActiveRecord::Promise - # @return [Complete] a new instance of Complete - # # pkg:gem/activerecord#lib/active_record/promise.rb:66 def initialize(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/promise.rb:74 def pending?; end # pkg:gem/activerecord#lib/active_record/promise.rb:70 def then; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/active_record/promise.rb:64 def value; end @@ -29544,8 +27207,6 @@ end # pkg:gem/activerecord#lib/active_record/migration.rb:206 class ActiveRecord::ProtectedEnvironmentError < ::ActiveRecord::ActiveRecordError - # @return [ProtectedEnvironmentError] a new instance of ProtectedEnvironmentError - # # pkg:gem/activerecord#lib/active_record/migration.rb:207 def initialize(env = T.unsafe(nil)); end end @@ -29752,8 +27413,6 @@ end # pkg:gem/activerecord#lib/active_record/query_logs.rb:79 class ActiveRecord::QueryLogs::GetKeyHandler - # @return [GetKeyHandler] a new instance of GetKeyHandler - # # pkg:gem/activerecord#lib/active_record/query_logs.rb:80 def initialize(name); end @@ -29763,8 +27422,6 @@ end # pkg:gem/activerecord#lib/active_record/query_logs.rb:89 class ActiveRecord::QueryLogs::IdentityHandler - # @return [IdentityHandler] a new instance of IdentityHandler - # # pkg:gem/activerecord#lib/active_record/query_logs.rb:90 def initialize(value); end @@ -29798,8 +27455,6 @@ end # pkg:gem/activerecord#lib/active_record/query_logs.rb:99 class ActiveRecord::QueryLogs::ZeroArityHandler - # @return [ZeroArityHandler] a new instance of ZeroArityHandler - # # pkg:gem/activerecord#lib/active_record/query_logs.rb:100 def initialize(proc); end @@ -30351,11 +28006,6 @@ module ActiveRecord::QueryMethods # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:173 def joins_values=(value); end - # Performs LEFT OUTER JOINs on +args+: - # - # User.left_outer_joins(:posts) - # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:887 def left_joins(*args); end @@ -30443,8 +28093,6 @@ module ActiveRecord::QueryMethods # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:1286 def none!; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:1294 def null_relation?; end @@ -30853,8 +28501,6 @@ module ActiveRecord::QueryMethods # Post.joins(:comments).structurally_compatible?(Post.where("id = 1")) # # => false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:1121 def structurally_compatible?(other); end @@ -31121,8 +28767,6 @@ module ActiveRecord::QueryMethods # .with(posts_with_comments: Post.where("comments_count > ?", 0)) # .with(posts_with_tags: Post.where("tags_count > ?", 0)) # - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:493 def with(*args); end @@ -31158,33 +28802,6 @@ module ActiveRecord::QueryMethods # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:173 def with_values=(value); end - # Excludes the specified record (or collection of records) from the resulting - # relation. For example: - # - # Post.excluding(post) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" != 1 - # - # Post.excluding(post_one, post_two) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (1, 2) - # - # Post.excluding(Post.drafts) - # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (3, 4, 5) - # - # This can also be called on associations. As with the above example, either - # a single record of collection thereof may be specified: - # - # post = Post.find(1) - # comment = Comment.find(2) - # post.comments.excluding(comment) - # # SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 AND "comments"."id" != 2 - # - # This is short-hand for .where.not(id: post.id) and .where.not(id: [post_one.id, post_two.id]). - # - # An ArgumentError will be raised if either no records are - # specified, or if any of the records in the collection (if a collection - # is passed in) are not instances of the same model that the relation is - # scoping. - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:1586 def without(*records); end @@ -31222,8 +28839,6 @@ module ActiveRecord::QueryMethods # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:1958 def arel_columns_from_hash(fields); end - # @raise [UnmodifiableRelation] - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:1746 def assert_modifiable!; end @@ -31298,8 +28913,6 @@ module ActiveRecord::QueryMethods # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:2135 def column_references(order_args); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:2055 def does_not_support_reverse?(order); end @@ -31345,8 +28958,6 @@ module ActiveRecord::QueryMethods # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:2277 def structurally_incompatible_values_for(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:2007 def table_name_matches?(from); end @@ -31358,8 +28969,6 @@ end # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:151 class ActiveRecord::QueryMethods::CTEJoin - # @return [CTEJoin] a new instance of CTEJoin - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:154 def initialize(name); end @@ -31387,8 +28996,6 @@ ActiveRecord::QueryMethods::VALID_UNSCOPING_VALUES = T.let(T.unsafe(nil), Set) # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:14 class ActiveRecord::QueryMethods::WhereChain - # @return [WhereChain] a new instance of WhereChain - # # pkg:gem/activerecord#lib/active_record/relation/query_methods.rb:15 def initialize(scope); end @@ -31956,8 +29563,6 @@ module ActiveRecord::ReadonlyAttributes::ClassMethods # pkg:gem/activerecord#lib/active_record/readonly_attributes.rb:30 def attr_readonly(*attributes); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/readonly_attributes.rb:43 def readonly_attribute?(name); end @@ -31990,13 +29595,9 @@ end # # pkg:gem/activerecord#lib/active_record/validations.rb:15 class ActiveRecord::RecordInvalid < ::ActiveRecord::ActiveRecordError - # @return [RecordInvalid] a new instance of RecordInvalid - # # pkg:gem/activerecord#lib/active_record/validations.rb:18 def initialize(record = T.unsafe(nil)); end - # Returns the value of attribute record. - # # pkg:gem/activerecord#lib/active_record/validations.rb:16 def record; end end @@ -32016,13 +29617,9 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:181 class ActiveRecord::RecordNotDestroyed < ::ActiveRecord::ActiveRecordError - # @return [RecordNotDestroyed] a new instance of RecordNotDestroyed - # # pkg:gem/activerecord#lib/active_record/errors.rb:184 def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end - # Returns the value of attribute record. - # # pkg:gem/activerecord#lib/active_record/errors.rb:182 def record; end end @@ -32031,23 +29628,15 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:135 class ActiveRecord::RecordNotFound < ::ActiveRecord::ActiveRecordError - # @return [RecordNotFound] a new instance of RecordNotFound - # # pkg:gem/activerecord#lib/active_record/errors.rb:138 def initialize(message = T.unsafe(nil), model = T.unsafe(nil), primary_key = T.unsafe(nil), id = T.unsafe(nil)); end - # Returns the value of attribute id. - # # pkg:gem/activerecord#lib/active_record/errors.rb:136 def id; end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/errors.rb:136 def model; end - # Returns the value of attribute primary_key. - # # pkg:gem/activerecord#lib/active_record/errors.rb:136 def primary_key; end end @@ -32068,13 +29657,9 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:160 class ActiveRecord::RecordNotSaved < ::ActiveRecord::ActiveRecordError - # @return [RecordNotSaved] a new instance of RecordNotSaved - # # pkg:gem/activerecord#lib/active_record/errors.rb:163 def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end - # Returns the value of attribute record. - # # pkg:gem/activerecord#lib/active_record/errors.rb:161 def record; end end @@ -32154,8 +29739,6 @@ end # # pkg:gem/activerecord#lib/active_record/reflection.rb:163 class ActiveRecord::Reflection::AbstractReflection - # @return [AbstractReflection] a new instance of AbstractReflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:164 def initialize; end @@ -32191,16 +29774,12 @@ class ActiveRecord::Reflection::AbstractReflection # pkg:gem/activerecord#lib/active_record/reflection.rb:244 def counter_cache_column; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:324 def counter_must_be_updated_by_has_many?; end # Returns whether this association has a counter cache and its column values were backfilled # (and so it is used internally by methods like +size+/+any?+/etc). # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:315 def has_active_cached_counter?; end @@ -32209,30 +29788,15 @@ class ActiveRecord::Reflection::AbstractReflection # The counter_cache option must be given on either the owner or inverse # association, and the column must be present on the owner. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:307 def has_cached_counter?; end # pkg:gem/activerecord#lib/active_record/reflection.rb:258 def inverse_of; end - # We need to avoid the following situation: - # - # * An associated record is deleted via record.destroy - # * Hence the callbacks run, and they find a belongs_to on the record with a - # :counter_cache options which points back at our owner. So they update the - # counter cache. - # * In which case, we must make sure to *not* update the counter cache, or else - # it will be decremented twice. - # - # Hence this method. - # # pkg:gem/activerecord#lib/active_record/reflection.rb:297 def inverse_updates_counter_cache?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:299 def inverse_updates_counter_in_memory?; end @@ -32265,8 +29829,6 @@ class ActiveRecord::Reflection::AbstractReflection # pkg:gem/activerecord#lib/active_record/reflection.rb:196 def scopes; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:340 def strict_loading?; end @@ -32276,15 +29838,11 @@ class ActiveRecord::Reflection::AbstractReflection # pkg:gem/activerecord#lib/active_record/reflection.rb:176 def table_name; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:172 def through_reflection?; end protected - # FIXME: this is a horrible name - # # pkg:gem/activerecord#lib/active_record/reflection.rb:351 def actual_source_reflection; end @@ -32311,7 +29869,7 @@ end # # pkg:gem/activerecord#lib/active_record/reflection.rb:489 class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflection::MacroReflection - # @return [AssociationReflection] a new instance of AssociationReflection + # Reflection # # pkg:gem/activerecord#lib/active_record/reflection.rb:517 def initialize(name, scope, options, active_record); end @@ -32328,8 +29886,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # pkg:gem/activerecord#lib/active_record/reflection.rb:745 def add_as_through(seed); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:727 def association_class; end @@ -32344,8 +29900,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # Returns +true+ if +self+ is a +belongs_to+ reflection. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:722 def belongs_to?; end @@ -32371,16 +29925,12 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # association. Returns +true+ if the +macro+ is either +has_many+ or # +has_and_belongs_to_many+, +false+ otherwise. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:704 def collection?; end # pkg:gem/activerecord#lib/active_record/reflection.rb:490 def compute_class(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:753 def deprecated?; end @@ -32390,25 +29940,17 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # pkg:gem/activerecord#lib/active_record/reflection.rb:558 def foreign_key(infer_from_inverse_of: T.unsafe(nil)); end - # Returns the value of attribute foreign_type. - # # pkg:gem/activerecord#lib/active_record/reflection.rb:514 def foreign_type; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:682 def has_inverse?; end # Returns +true+ if +self+ is a +has_one+ reflection. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:725 def has_one?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:678 def has_scope?; end @@ -32431,28 +29973,18 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # has_many :clients returns :has_many # - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:699 def macro; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:674 def nested?; end - # Reflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:515 def parent_reflection; end - # Reflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:515 def parent_reflection=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:729 def polymorphic?; end @@ -32468,8 +30000,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # pkg:gem/activerecord#lib/active_record/reflection.rb:654 def through_reflection; end - # Returns the value of attribute type. - # # pkg:gem/activerecord#lib/active_record/reflection.rb:514 def type; end @@ -32483,8 +30013,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # * you use autosave; autosave: true # * the association is a +has_many+ association # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:717 def validate?; end @@ -32502,8 +30030,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # Third, we must not have options such as :foreign_key # which prevent us from correctly guessing the inverse association. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:812 def can_find_inverse_of_automatically?(reflection, inverse_reflection = T.unsafe(nil)); end @@ -32533,8 +30059,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # config.active_record.automatic_scope_inversing is set to # +true+ (the default for new applications). # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:825 def scope_allows_automatic_inverse_of?(reflection, inverse_reflection); end @@ -32543,8 +30067,6 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # make sure that the reflection's active_record name matches up # with the current reflection's klass name. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:798 def valid_inverse_reflection?(reflection); end end @@ -32559,8 +30081,6 @@ class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection # pkg:gem/activerecord#lib/active_record/reflection.rb:938 def association_primary_key(klass = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:927 def belongs_to?; end @@ -32578,8 +30098,6 @@ class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:969 def can_find_inverse_of_automatically?(*_arg0); end end @@ -32659,8 +30177,6 @@ end # pkg:gem/activerecord#lib/active_record/reflection.rb:974 class ActiveRecord::Reflection::HasAndBelongsToManyReflection < ::ActiveRecord::Reflection::AssociationReflection - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:977 def collection?; end @@ -32673,8 +30189,6 @@ class ActiveRecord::Reflection::HasManyReflection < ::ActiveRecord::Reflection:: # pkg:gem/activerecord#lib/active_record/reflection.rb:901 def association_class; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:899 def collection?; end @@ -32687,8 +30201,6 @@ class ActiveRecord::Reflection::HasOneReflection < ::ActiveRecord::Reflection::A # pkg:gem/activerecord#lib/active_record/reflection.rb:915 def association_class; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:913 def has_one?; end @@ -32701,8 +30213,6 @@ end # # pkg:gem/activerecord#lib/active_record/reflection.rb:369 class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [MacroReflection] a new instance of MacroReflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:388 def initialize(name, scope, options, active_record); end @@ -32715,8 +30225,6 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # pkg:gem/activerecord#lib/active_record/reflection.rb:426 def _klass(class_name); end - # Returns the value of attribute active_record. - # # pkg:gem/activerecord#lib/active_record/reflection.rb:384 def active_record; end @@ -32764,8 +30272,6 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # pkg:gem/activerecord#lib/active_record/reflection.rb:386 def plural_name; end - # Returns the value of attribute scope. - # # pkg:gem/activerecord#lib/active_record/reflection.rb:376 def scope; end @@ -32783,8 +30289,6 @@ end # pkg:gem/activerecord#lib/active_record/reflection.rb:1263 class ActiveRecord::Reflection::PolymorphicReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [PolymorphicReflection] a new instance of PolymorphicReflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:1267 def initialize(reflection, previous_reflection); end @@ -32826,8 +30330,6 @@ end # pkg:gem/activerecord#lib/active_record/reflection.rb:1293 class ActiveRecord::Reflection::RuntimeReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [RuntimeReflection] a new instance of RuntimeReflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:1296 def initialize(reflection, association); end @@ -32861,8 +30363,6 @@ end # # pkg:gem/activerecord#lib/active_record/reflection.rb:984 class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection::AbstractReflection - # @return [ThroughReflection] a new instance of ThroughReflection - # # pkg:gem/activerecord#lib/active_record/reflection.rb:988 def initialize(delegate_reflection); end @@ -32968,8 +30468,6 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # pkg:gem/activerecord#lib/active_record/reflection.rb:1260 def has_one?(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:1083 def has_scope?; end @@ -33002,8 +30500,6 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # A through association is nested if there would be more than one join table # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:1090 def nested?; end @@ -33095,8 +30591,6 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # pkg:gem/activerecord#lib/active_record/reflection.rb:1042 def through_reflection; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/reflection.rb:999 def through_reflection?; end @@ -33108,8 +30602,6 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: protected - # FIXME: this is a horrible name - # # pkg:gem/activerecord#lib/active_record/reflection.rb:1221 def actual_source_reflection; end @@ -33121,8 +30613,6 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # pkg:gem/activerecord#lib/active_record/reflection.rb:1228 def collect_join_reflections(seed); end - # Returns the value of attribute delegate_reflection. - # # pkg:gem/activerecord#lib/active_record/reflection.rb:1226 def delegate_reflection; end @@ -33150,8 +30640,6 @@ class ActiveRecord::Relation include ::ActiveRecord::SignedId::RelationMethods extend ::ActiveRecord::Delegation::ClassMethods - # @return [Relation] a new instance of Relation - # # pkg:gem/activerecord#lib/active_record/relation.rb:77 def initialize(model, table: T.unsafe(nil), predicate_builder: T.unsafe(nil), values: T.unsafe(nil)); end @@ -33173,36 +30661,17 @@ class ActiveRecord::Relation # # posts.any?(Post) # => true or false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:401 def any?(*args); end - # @yield [attr, bind] - # # pkg:gem/activerecord#lib/active_record/relation.rb:102 def bind_attribute(name, value); end # Returns true if relation is blank. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1294 def blank?; end - # Initializes new record from relation while maintaining the current - # scope. - # - # Expects arguments in the same format as {ActiveRecord::Base.new}[rdoc-ref:Core.new]. - # - # users = User.where(name: 'DHH') - # user = users.new # => # - # - # You can also pass a block to new with the new record as argument: - # - # user = users.new { |user| user.name = 'Oscar' } - # user.name # => Oscar - # # pkg:gem/activerecord#lib/active_record/relation.rb:133 def build(attributes = T.unsafe(nil), &block); end @@ -33436,20 +30905,14 @@ class ActiveRecord::Relation # Returns true if relation needs eager loading. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1258 def eager_loading?; end # Returns true if there are no records. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:372 def empty?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1319 def empty_scope?; end @@ -33555,8 +31018,6 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:186 def first_or_initialize(attributes = T.unsafe(nil), &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1323 def has_limit_or_offset?; end @@ -33727,8 +31188,6 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:1268 def joined_includes_values; end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/relation.rb:73 def klass; end @@ -33761,13 +31220,9 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:1158 def load_async; end - # Returns the value of attribute loaded. - # # pkg:gem/activerecord#lib/active_record/relation.rb:71 def loaded; end - # Returns the value of attribute loaded. - # # pkg:gem/activerecord#lib/active_record/relation.rb:74 def loaded?; end @@ -33776,13 +31231,9 @@ class ActiveRecord::Relation # Returns true if there is more than one record. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:423 def many?; end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/relation.rb:71 def model; end @@ -33809,8 +31260,6 @@ class ActiveRecord::Relation # # posts.none?(Comment) # => true or false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:388 def none?(*args); end @@ -33821,13 +31270,9 @@ class ActiveRecord::Relation # # posts.one?(Post) # => true or false # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:414 def one?(*args); end - # Returns the value of attribute predicate_builder. - # # pkg:gem/activerecord#lib/active_record/relation.rb:71 def predicate_builder; end @@ -33837,8 +31282,6 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:1284 def pretty_print(pp); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1298 def readonly?; end @@ -33856,8 +31299,6 @@ class ActiveRecord::Relation # Returns true if the relation was scheduled on the background # thread pool. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1189 def scheduled?; end @@ -33887,28 +31328,18 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:363 def size; end - # Returns the value of attribute skip_preloading_value. - # # pkg:gem/activerecord#lib/active_record/relation.rb:72 def skip_preloading_value; end - # Sets the attribute skip_preloading_value - # - # @param value the value to set the attribute skip_preloading_value to. - # # pkg:gem/activerecord#lib/active_record/relation.rb:72 def skip_preloading_value=(_arg0); end - # Returns the value of attribute table. - # # pkg:gem/activerecord#lib/active_record/relation.rb:71 def table; end # pkg:gem/activerecord#lib/active_record/relation.rb:1177 def then(&block); end - # Converts relation objects to Array. - # # pkg:gem/activerecord#lib/active_record/relation.rb:350 def to_a; end @@ -33987,8 +31418,6 @@ class ActiveRecord::Relation # # Update all books with 'Rails' in their title # Book.where('title LIKE ?', '%Rails%').update_all(title: Arel.sql("title + ' - volume 1'")) # - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/relation.rb:598 def update_all(updates); end @@ -34169,8 +31598,6 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:1401 def _substitute_values(values); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1357 def already_in_scope?(registry); end @@ -34189,8 +31616,6 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:1423 def exec_queries(&block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1361 def global_scope?(registry); end @@ -34203,8 +31628,6 @@ class ActiveRecord::Relation # pkg:gem/activerecord#lib/active_record/relation.rb:1522 def limited_count; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1498 def references_eager_loaded_tables?; end @@ -34220,8 +31643,6 @@ ActiveRecord::Relation::CLAUSE_METHODS = T.let(T.unsafe(nil), Array) # pkg:gem/activerecord#lib/active_record/relation.rb:6 class ActiveRecord::Relation::ExplainProxy - # @return [ExplainProxy] a new instance of ExplainProxy - # # pkg:gem/activerecord#lib/active_record/relation.rb:7 def initialize(relation, options); end @@ -34260,29 +31681,21 @@ end # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:5 class ActiveRecord::Relation::FromClause - # @return [FromClause] a new instance of FromClause - # # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:8 def initialize(value, name); end # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:21 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:17 def empty?; end # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:13 def merge(other); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:6 def name; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/active_record/relation/from_clause.rb:6 def value; end @@ -34294,13 +31707,9 @@ end # pkg:gem/activerecord#lib/active_record/relation/merger.rb:7 class ActiveRecord::Relation::HashMerger - # @return [HashMerger] a new instance of HashMerger - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:10 def initialize(relation, hash); end - # Returns the value of attribute hash. - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:8 def hash; end @@ -34315,8 +31724,6 @@ class ActiveRecord::Relation::HashMerger # pkg:gem/activerecord#lib/active_record/relation/merger.rb:25 def other; end - # Returns the value of attribute relation. - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:8 def relation; end end @@ -34329,26 +31736,18 @@ ActiveRecord::Relation::MULTI_VALUE_METHODS = T.let(T.unsafe(nil), Array) # pkg:gem/activerecord#lib/active_record/relation/merger.rb:43 class ActiveRecord::Relation::Merger - # @return [Merger] a new instance of Merger - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:46 def initialize(relation, other); end # pkg:gem/activerecord#lib/active_record/relation/merger.rb:58 def merge; end - # Returns the value of attribute other. - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:44 def other; end - # Returns the value of attribute relation. - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:44 def relation; end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:44 def values; end @@ -34375,8 +31774,6 @@ class ActiveRecord::Relation::Merger # pkg:gem/activerecord#lib/active_record/relation/merger.rb:168 def merge_single_values; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/merger.rb:186 def replace_from_clause?; end end @@ -34386,8 +31783,6 @@ ActiveRecord::Relation::Merger::NORMAL_VALUES = T.let(T.unsafe(nil), Array) # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:7 class ActiveRecord::Relation::QueryAttribute < ::ActiveModel::Attribute - # @return [QueryAttribute] a new instance of QueryAttribute - # # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:8 def initialize(*_arg0, **_arg1, &_arg2); end @@ -34400,21 +31795,15 @@ class ActiveRecord::Relation::QueryAttribute < ::ActiveModel::Attribute # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:60 def hash; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:44 def infinite?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:37 def nil?; end # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:24 def type_cast(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:48 def unboundable?; end @@ -34426,8 +31815,6 @@ class ActiveRecord::Relation::QueryAttribute < ::ActiveModel::Attribute private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/query_attribute.rb:65 def infinity?(value); end end @@ -34438,8 +31825,6 @@ ActiveRecord::Relation::SINGLE_VALUE_METHODS = T.let(T.unsafe(nil), Array) # pkg:gem/activerecord#lib/active_record/relation.rb:1331 class ActiveRecord::Relation::StrictLoadingScope class << self - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation.rb:1332 def empty_scope?; end @@ -34453,8 +31838,6 @@ ActiveRecord::Relation::VALUE_METHODS = T.let(T.unsafe(nil), Array) # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:7 class ActiveRecord::Relation::WhereClause - # @return [WhereClause] a new instance of WhereClause - # # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:10 def initialize(predicates); end @@ -34473,8 +31856,6 @@ class ActiveRecord::Relation::WhereClause # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:70 def ast; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:99 def contradiction?; end @@ -34510,8 +31891,6 @@ class ActiveRecord::Relation::WhereClause protected - # Returns the value of attribute predicates. - # # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:117 def predicates; end @@ -34526,8 +31905,6 @@ class ActiveRecord::Relation::WhereClause # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:149 def equalities(predicates, equality_only); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/relation/where_clause.rb:163 def equality_node?(node); end @@ -34599,16 +31976,12 @@ ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(ni class ActiveRecord::Result include ::Enumerable - # @return [Result] a new instance of Result - # # pkg:gem/activerecord#lib/active_record/result.rb:107 def initialize(columns, rows, column_types = T.unsafe(nil), affected_rows: T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/result.rb:155 def [](idx); end - # Returns the value of attribute affected_rows. - # # pkg:gem/activerecord#lib/active_record/result.rb:97 def affected_rows; end @@ -34628,8 +32001,6 @@ class ActiveRecord::Result # pkg:gem/activerecord#lib/active_record/result.rb:167 def column_types; end - # Returns the value of attribute columns. - # # pkg:gem/activerecord#lib/active_record/result.rb:97 def columns; end @@ -34645,8 +32016,6 @@ class ActiveRecord::Result # Returns true if there are no records, otherwise false. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/result.rb:144 def empty?; end @@ -34655,8 +32024,6 @@ class ActiveRecord::Result # Returns true if this result set includes the column named +name+ # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/result.rb:120 def includes_column?(name); end @@ -34676,13 +32043,9 @@ class ActiveRecord::Result # pkg:gem/activerecord#lib/active_record/result.rb:182 def result; end - # Returns the value of attribute rows. - # # pkg:gem/activerecord#lib/active_record/result.rb:97 def rows; end - # Returns an array of hashes representing each row record. - # # pkg:gem/activerecord#lib/active_record/result.rb:153 def to_a; end @@ -34716,8 +32079,6 @@ ActiveRecord::Result::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # pkg:gem/activerecord#lib/active_record/result.rb:44 class ActiveRecord::Result::IndexedRow - # @return [IndexedRow] a new instance of IndexedRow - # # pkg:gem/activerecord#lib/active_record/result.rb:45 def initialize(column_indexes, row); end @@ -34733,8 +32094,6 @@ class ActiveRecord::Result::IndexedRow # pkg:gem/activerecord#lib/active_record/result.rb:75 def fetch(column); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/result.rb:71 def key?(column); end @@ -34811,64 +32170,36 @@ end # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:10 class ActiveRecord::RuntimeRegistry::Stats - # @return [Stats] a new instance of Stats - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:13 def initialize; end - # Returns the value of attribute async_sql_runtime. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def async_sql_runtime; end - # Sets the attribute async_sql_runtime - # - # @param value the value to set the attribute async_sql_runtime to. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def async_sql_runtime=(_arg0); end - # Returns the value of attribute cached_queries_count. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def cached_queries_count; end - # Sets the attribute cached_queries_count - # - # @param value the value to set the attribute cached_queries_count to. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def cached_queries_count=(_arg0); end - # Returns the value of attribute queries_count. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def queries_count; end - # Sets the attribute queries_count - # - # @param value the value to set the attribute queries_count to. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def queries_count=(_arg0); end - # @return [Stats] a new instance of Stats - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:27 def reset; end # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:20 def reset_runtimes; end - # Returns the value of attribute sql_runtime. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def sql_runtime; end - # Sets the attribute sql_runtime - # - # @param value the value to set the attribute sql_runtime to. - # # pkg:gem/activerecord#lib/active_record/runtime_registry.rb:11 def sql_runtime=(_arg0); end end @@ -34877,30 +32208,18 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:312 class ActiveRecord::SQLWarning < ::ActiveRecord::AdapterError - # @return [SQLWarning] a new instance of SQLWarning - # # pkg:gem/activerecord#lib/active_record/errors.rb:316 def initialize(message = T.unsafe(nil), code = T.unsafe(nil), level = T.unsafe(nil), sql = T.unsafe(nil), connection_pool = T.unsafe(nil)); end - # Returns the value of attribute code. - # # pkg:gem/activerecord#lib/active_record/errors.rb:313 def code; end - # Returns the value of attribute level. - # # pkg:gem/activerecord#lib/active_record/errors.rb:313 def level; end - # Returns the value of attribute sql. - # # pkg:gem/activerecord#lib/active_record/errors.rb:314 def sql; end - # Sets the attribute sql - # - # @param value the value to set the attribute sql to. - # # pkg:gem/activerecord#lib/active_record/errors.rb:314 def sql=(_arg0); end end @@ -34917,32 +32236,6 @@ module ActiveRecord::Sanitization::ClassMethods # pkg:gem/activerecord#lib/active_record/sanitization.rb:185 def disallow_raw_sql!(args, permit: T.unsafe(nil)); end - # Accepts an array of SQL conditions and sanitizes them into a valid - # SQL fragment for a WHERE clause. - # - # sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4]) - # # => "name='foo''bar' and group_id=4" - # - # sanitize_sql_for_conditions(["name=:name and group_id=:group_id", name: "foo'bar", group_id: 4]) - # # => "name='foo''bar' and group_id='4'" - # - # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) - # # => "name='foo''bar' and group_id='4'" - # - # This method will NOT sanitize an SQL string since it won't contain - # any conditions in it and will return the string as is. - # - # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") - # # => "name='foo''bar' and group_id='4'" - # - # Note that this sanitization method is not schema-aware, hence won't do any type casting - # and will directly use the database adapter's +quote+ method. - # For MySQL specifically this means that numeric parameters will be quoted as strings - # to prevent query manipulation attacks. - # - # sanitize_sql_for_conditions(["role = ?", 0]) - # # => "role = '0'" - # # pkg:gem/activerecord#lib/active_record/sanitization.rb:41 def sanitize_sql(condition); end @@ -35167,15 +32460,9 @@ end # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:10 class ActiveRecord::SchemaDumper - # @return [SchemaDumper] a new instance of SchemaDumper - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:74 def initialize(connection, options = T.unsafe(nil)); end - # :singleton-method: - # Specify a custom regular expression matching check constraints which name - # should not be dumped to db/schema.rb. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:29 def chk_ignore_pattern; end @@ -35185,40 +32472,24 @@ class ActiveRecord::SchemaDumper # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:60 def dump(stream); end - # :singleton-method: - # Specify a custom regular expression matching exclusion constraints which name - # should not be dumped to db/schema.rb. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:35 def excl_ignore_pattern; end # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:35 def excl_ignore_pattern=(val); end - # :singleton-method: - # Specify a custom regular expression matching foreign keys which name - # should not be dumped to db/schema.rb. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:23 def fk_ignore_pattern; end # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:23 def fk_ignore_pattern=(val); end - # :singleton-method: - # A list of tables which should not be dumped to the schema. - # Acceptable values are strings and regexps. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:17 def ignore_tables; end # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:17 def ignore_tables=(val); end - # :singleton-method: - # Specify a custom regular expression matching unique constraints which name - # should not be dumped to db/schema.rb. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:41 def unique_ignore_pattern; end @@ -35261,8 +32532,6 @@ class ActiveRecord::SchemaDumper # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:96 def header(stream); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:378 def ignored?(table_name); end @@ -35291,15 +32560,9 @@ class ActiveRecord::SchemaDumper # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:158 def table(table, stream); end - # Returns the value of attribute table_name. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:72 def table_name; end - # Sets the attribute table_name - # - # @param value the value to set the attribute table_name to. - # # pkg:gem/activerecord#lib/active_record/schema_dumper.rb:72 def table_name=(_arg0); end @@ -35370,13 +32633,9 @@ end # # pkg:gem/activerecord#lib/active_record/schema_migration.rb:8 class ActiveRecord::SchemaMigration - # @return [SchemaMigration] a new instance of SchemaMigration - # # pkg:gem/activerecord#lib/active_record/schema_migration.rb:14 def initialize(pool); end - # Returns the value of attribute arel_table. - # # pkg:gem/activerecord#lib/active_record/schema_migration.rb:12 def arel_table; end @@ -35410,8 +32669,6 @@ class ActiveRecord::SchemaMigration # pkg:gem/activerecord#lib/active_record/schema_migration.rb:45 def primary_key; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/schema_migration.rb:100 def table_exists?; end @@ -35481,8 +32738,6 @@ module ActiveRecord::Scoping::ClassMethods # Are there attributes associated with this scope? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/scoping.rb:21 def scope_attributes?; end @@ -35517,15 +32772,11 @@ module ActiveRecord::Scoping::Default::ClassMethods # is set to true, the method will check if there are any # default_scopes for the model where +all_queries+ is true. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:62 def default_scopes?(all_queries: T.unsafe(nil)); end # Are there attributes associated with this scope? # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:55 def scope_attributes?; end @@ -35639,34 +32890,24 @@ module ActiveRecord::Scoping::Default::ClassMethods # all_queries set, then execute on all queries; select, insert, update, # delete, and reload. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:177 def execute_scope?(all_queries, default_scope_obj); end # pkg:gem/activerecord#lib/active_record/scoping/default.rb:185 def ignore_default_scope=(ignore); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:181 def ignore_default_scope?; end end # pkg:gem/activerecord#lib/active_record/scoping/default.rb:5 class ActiveRecord::Scoping::DefaultScope - # @return [DefaultScope] a new instance of DefaultScope - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:8 def initialize(scope, all_queries = T.unsafe(nil)); end - # Returns the value of attribute all_queries. - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:6 def all_queries; end - # Returns the value of attribute scope. - # # pkg:gem/activerecord#lib/active_record/scoping/default.rb:6 def scope; end end @@ -35834,8 +33075,6 @@ end # # pkg:gem/activerecord#lib/active_record/scoping.rb:75 class ActiveRecord::Scoping::ScopeRegistry - # @return [ScopeRegistry] a new instance of ScopeRegistry - # # pkg:gem/activerecord#lib/active_record/scoping.rb:85 def initialize; end @@ -35936,8 +33175,6 @@ module ActiveRecord::SecurePassword::ClassMethods # User.authenticate_by(email: "jdoe@example.com") # => ArgumentError # User.authenticate_by(password: "abc123") # => ArgumentError # - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/secure_password.rb:41 def authenticate_by(attributes); end end @@ -36079,8 +33316,6 @@ module ActiveRecord::SignedId # And you then change your +find_signed+ calls to require this new purpose. Any old signed ids that were not # created with the purpose will no longer find the record. # - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/active_record/signed_id.rb:160 def signed_id(expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), purpose: T.unsafe(nil)); end @@ -36129,8 +33364,6 @@ module ActiveRecord::SignedId::ClassMethods # travel_back # User.find_signed signed_id, purpose: :password_reset # => User.first # - # @raise [UnknownPrimaryKey] - # # pkg:gem/activerecord#lib/active_record/signed_id.rb:68 def find_signed(signed_id, purpose: T.unsafe(nil), on_rotation: T.unsafe(nil)); end @@ -36180,13 +33413,9 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:191 class ActiveRecord::SoleRecordExceeded < ::ActiveRecord::ActiveRecordError - # @return [SoleRecordExceeded] a new instance of SoleRecordExceeded - # # pkg:gem/activerecord#lib/active_record/errors.rb:194 def initialize(record = T.unsafe(nil)); end - # Returns the value of attribute record. - # # pkg:gem/activerecord#lib/active_record/errors.rb:192 def record; end end @@ -36254,18 +33483,12 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:378 class ActiveRecord::StaleObjectError < ::ActiveRecord::ActiveRecordError - # @return [StaleObjectError] a new instance of StaleObjectError - # # pkg:gem/activerecord#lib/active_record/errors.rb:381 def initialize(record = T.unsafe(nil), attempted_action = T.unsafe(nil)); end - # Returns the value of attribute attempted_action. - # # pkg:gem/activerecord#lib/active_record/errors.rb:379 def attempted_action; end - # Returns the value of attribute record. - # # pkg:gem/activerecord#lib/active_record/errors.rb:379 def record; end end @@ -36299,8 +33522,6 @@ end # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:30 class ActiveRecord::StatementCache - # @return [StatementCache] a new instance of StatementCache - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:143 def initialize(query_builder, bind_map, model); end @@ -36320,8 +33541,6 @@ class ActiveRecord::StatementCache # pkg:gem/activerecord#lib/active_record/statement_cache.rb:101 def query(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:162 def unsupported_value?(value); end end @@ -36329,8 +33548,6 @@ end # pkg:gem/activerecord#lib/active_record/statement_cache.rb:117 class ActiveRecord::StatementCache::BindMap - # @return [BindMap] a new instance of BindMap - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:118 def initialize(bound_attributes); end @@ -36346,8 +33563,6 @@ end # pkg:gem/activerecord#lib/active_record/statement_cache.rb:46 class ActiveRecord::StatementCache::PartialQuery < ::ActiveRecord::StatementCache::Query - # @return [PartialQuery] a new instance of PartialQuery - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:47 def initialize(values, retryable:); end @@ -36357,8 +33572,6 @@ end # pkg:gem/activerecord#lib/active_record/statement_cache.rb:68 class ActiveRecord::StatementCache::PartialQueryCollector - # @return [PartialQueryCollector] a new instance of PartialQueryCollector - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:71 def initialize; end @@ -36371,27 +33584,15 @@ class ActiveRecord::StatementCache::PartialQueryCollector # pkg:gem/activerecord#lib/active_record/statement_cache.rb:87 def add_binds(binds, proc_for_binds = T.unsafe(nil), &_arg2); end - # Returns the value of attribute preparable. - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:69 def preparable; end - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:69 def preparable=(_arg0); end - # Returns the value of attribute retryable. - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:69 def retryable; end - # Sets the attribute retryable - # - # @param value the value to set the attribute retryable to. - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:69 def retryable=(_arg0); end @@ -36401,8 +33602,6 @@ end # pkg:gem/activerecord#lib/active_record/statement_cache.rb:33 class ActiveRecord::StatementCache::Query - # @return [Query] a new instance of Query - # # pkg:gem/activerecord#lib/active_record/statement_cache.rb:36 def initialize(sql, retryable:); end @@ -36422,21 +33621,15 @@ class ActiveRecord::StatementCache::Substitute; end # # pkg:gem/activerecord#lib/active_record/errors.rb:203 class ActiveRecord::StatementInvalid < ::ActiveRecord::AdapterError - # @return [StatementInvalid] a new instance of StatementInvalid - # # pkg:gem/activerecord#lib/active_record/errors.rb:204 def initialize(message = T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # Returns the value of attribute binds. - # # pkg:gem/activerecord#lib/active_record/errors.rb:210 def binds; end # pkg:gem/activerecord#lib/active_record/errors.rb:212 def set_query(sql, binds); end - # Returns the value of attribute sql. - # # pkg:gem/activerecord#lib/active_record/errors.rb:210 def sql; end end @@ -36589,8 +33782,6 @@ end # pkg:gem/activerecord#lib/active_record/store.rb:289 class ActiveRecord::Store::IndifferentCoder - # @return [IndifferentCoder] a new instance of IndifferentCoder - # # pkg:gem/activerecord#lib/active_record/store.rb:290 def initialize(attr_name, coder_or_class_name); end @@ -36730,16 +33921,12 @@ end # pkg:gem/activerecord#lib/active_record/table_metadata.rb:4 class ActiveRecord::TableMetadata - # @return [TableMetadata] a new instance of TableMetadata - # # pkg:gem/activerecord#lib/active_record/table_metadata.rb:5 def initialize(klass, arel_table); end # pkg:gem/activerecord#lib/active_record/table_metadata.rb:53 def aggregated_with?(aggregation_name); end - # Returns the value of attribute arel_table. - # # pkg:gem/activerecord#lib/active_record/table_metadata.rb:63 def arel_table; end @@ -36749,8 +33936,6 @@ class ActiveRecord::TableMetadata # pkg:gem/activerecord#lib/active_record/table_metadata.rb:22 def associated_with(table_name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/table_metadata.rb:18 def has_column?(column_name); end @@ -36768,8 +33953,6 @@ class ActiveRecord::TableMetadata private - # Returns the value of attribute klass. - # # pkg:gem/activerecord#lib/active_record/table_metadata.rb:66 def klass; end end @@ -36786,8 +33969,6 @@ end # pkg:gem/activerecord#lib/active_record/tasks/abstract_tasks.rb:5 class ActiveRecord::Tasks::AbstractTasks - # @return [AbstractTasks] a new instance of AbstractTasks - # # pkg:gem/activerecord#lib/active_record/tasks/abstract_tasks.rb:10 def initialize(db_config); end @@ -36802,8 +33983,6 @@ class ActiveRecord::Tasks::AbstractTasks private - # Returns the value of attribute configuration_hash. - # # pkg:gem/activerecord#lib/active_record/tasks/abstract_tasks.rb:41 def configuration_hash; end @@ -36813,8 +33992,6 @@ class ActiveRecord::Tasks::AbstractTasks # pkg:gem/activerecord#lib/active_record/tasks/abstract_tasks.rb:43 def connection; end - # Returns the value of attribute db_config. - # # pkg:gem/activerecord#lib/active_record/tasks/abstract_tasks.rb:41 def db_config; end @@ -36831,8 +34008,6 @@ class ActiveRecord::Tasks::AbstractTasks def with_temporary_pool(db_config, migration_class, clobber: T.unsafe(nil)); end class << self - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/tasks/abstract_tasks.rb:6 def using_database_configurations?; end end @@ -36913,15 +34088,9 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:168 def create_current(environment = T.unsafe(nil), name = T.unsafe(nil)); end - # Returns the value of attribute database_configuration. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:61 def database_configuration; end - # Sets the attribute database_configuration - # - # @param value the value to set the attribute database_configuration to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:61 def database_configuration=(_arg0); end @@ -36931,10 +34100,6 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:83 def db_dir; end - # Sets the attribute db_dir - # - # @param value the value to set the attribute db_dir to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:60 def db_dir=(_arg0); end @@ -36964,20 +34129,12 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:103 def env; end - # Sets the attribute env - # - # @param value the value to set the attribute env to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:60 def env=(_arg0); end # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:91 def fixtures_path; end - # Sets the attribute fixtures_path - # - # @param value the value to set the attribute fixtures_path to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:60 def fixtures_path=(_arg0); end @@ -37014,10 +34171,6 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:87 def migrations_paths; end - # Sets the attribute migrations_paths - # - # @param value the value to set the attribute migrations_paths to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:60 def migrations_paths=(_arg0); end @@ -37048,28 +34201,18 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:99 def root; end - # Sets the attribute root - # - # @param value the value to set the attribute root to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:60 def root=(_arg0); end # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:471 def schema_dump_path(db_config, format = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:396 def schema_up_to_date?(configuration, _ = T.unsafe(nil), file = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:111 def seed_loader; end - # Sets the attribute seed_loader - # - # @param value the value to set the attribute seed_loader to. - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:60 def seed_loader=(_arg0); end @@ -37121,8 +34264,6 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:651 def initialize_database(db_config); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:626 def local_database?(db_config); end @@ -37141,8 +34282,6 @@ module ActiveRecord::Tasks::DatabaseTasks # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:228 def truncate_tables(db_config); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/tasks/database_tasks.rb:575 def verbose?; end @@ -37242,16 +34381,12 @@ ActiveRecord::Tasks::PostgreSQLDatabaseTasks::SQL_COMMENT_BEGIN = T.let(T.unsafe # pkg:gem/activerecord#lib/active_record/tasks/sqlite_database_tasks.rb:5 class ActiveRecord::Tasks::SQLiteDatabaseTasks < ::ActiveRecord::Tasks::AbstractTasks - # @return [SQLiteDatabaseTasks] a new instance of SQLiteDatabaseTasks - # # pkg:gem/activerecord#lib/active_record/tasks/sqlite_database_tasks.rb:6 def initialize(db_config, root = T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/tasks/sqlite_database_tasks.rb:58 def check_current_protected_environment!(db_config, migration_class); end - # @raise [DatabaseAlreadyExists] - # # pkg:gem/activerecord#lib/active_record/tasks/sqlite_database_tasks.rb:11 def create; end @@ -37272,8 +34407,6 @@ class ActiveRecord::Tasks::SQLiteDatabaseTasks < ::ActiveRecord::Tasks::Abstract # pkg:gem/activerecord#lib/active_record/tasks/sqlite_database_tasks.rb:71 def establish_connection(config = T.unsafe(nil)); end - # Returns the value of attribute root. - # # pkg:gem/activerecord#lib/active_record/tasks/sqlite_database_tasks.rb:69 def root; end end @@ -37288,16 +34421,12 @@ end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:177 class ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ActiveRecordError - # @return [ThroughCantAssociateThroughHasOneOrManyReflection] a new instance of ThroughCantAssociateThroughHasOneOrManyReflection - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:178 def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/active_record/associations/errors.rb:224 class ActiveRecord::ThroughNestedAssociationsAreReadonly < ::ActiveRecord::ActiveRecordError - # @return [ThroughNestedAssociationsAreReadonly] a new instance of ThroughNestedAssociationsAreReadonly - # # pkg:gem/activerecord#lib/active_record/associations/errors.rb:225 def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end end @@ -37384,8 +34513,6 @@ module ActiveRecord::Timestamp # pkg:gem/activerecord#lib/active_record/timestamp.rb:130 def record_update_timestamps; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/timestamp.rb:143 def should_record_timestamps?; end @@ -37528,8 +34655,6 @@ module ActiveRecord::TokenFor::RelationMethods # Finds a record using a given +token+ for a predefined +purpose+. Returns # +nil+ if the token is invalid or the record was not found. # - # @raise [UnknownPrimaryKey] - # # pkg:gem/activerecord#lib/active_record/token_for.rb:41 def find_by_token_for(purpose, token); end @@ -37544,48 +34669,21 @@ end # pkg:gem/activerecord#lib/active_record/token_for.rb:14 class ActiveRecord::TokenFor::TokenDefinition < ::Struct - # Returns the value of attribute block - # - # @return [Object] the current value of block - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def block; end - # Sets the attribute block - # - # @param value [Object] the value to set the attribute block to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def block=(_); end - # Returns the value of attribute defining_class - # - # @return [Object] the current value of defining_class - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def defining_class; end - # Sets the attribute defining_class - # - # @param value [Object] the value to set the attribute defining_class to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def defining_class=(_); end - # Returns the value of attribute expires_in - # - # @return [Object] the current value of expires_in - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def expires_in; end - # Sets the attribute expires_in - # - # @param value [Object] the value to set the attribute expires_in to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def expires_in=(_); end @@ -37601,18 +34699,9 @@ class ActiveRecord::TokenFor::TokenDefinition < ::Struct # pkg:gem/activerecord#lib/active_record/token_for.rb:23 def payload_for(model); end - # Returns the value of attribute purpose - # - # @return [Object] the current value of purpose - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def purpose; end - # Sets the attribute purpose - # - # @param value [Object] the value to set the attribute purpose to. - # @return [Object] the newly set value - # # pkg:gem/activerecord#lib/active_record/token_for.rb:14 def purpose=(_); end @@ -37652,8 +34741,6 @@ module ActiveRecord::TouchLater private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/touch_later.rb:66 def has_defer_touch_attrs?; end @@ -37732,8 +34819,6 @@ end # # pkg:gem/activerecord#lib/active_record/transaction.rb:68 class ActiveRecord::Transaction - # @return [Transaction] a new instance of Transaction - # # pkg:gem/activerecord#lib/active_record/transaction.rb:69 def initialize(internal_transaction); end @@ -37767,24 +34852,16 @@ class ActiveRecord::Transaction # pkg:gem/activerecord#lib/active_record/transaction.rb:104 def after_rollback(&block); end - # Returns true if the transaction doesn't exist or is finalized. - # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/transaction.rb:118 def blank?; end # Returns true if the transaction doesn't exist or is finalized. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/transaction.rb:114 def closed?; end # Returns true if the transaction exists and isn't finalized yet. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/transaction.rb:109 def open?; end @@ -37886,8 +34963,6 @@ module ActiveRecord::Transactions # pkg:gem/activerecord#lib/active_record/transactions.rb:372 def transaction(**options, &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/transactions.rb:447 def trigger_transactional_callbacks?; end @@ -37903,18 +34978,12 @@ module ActiveRecord::Transactions private - # Returns the value of attribute _committed_already_called. - # # pkg:gem/activerecord#lib/active_record/transactions.rb:453 def _committed_already_called; end - # Returns the value of attribute _trigger_destroy_callback. - # # pkg:gem/activerecord#lib/active_record/transactions.rb:453 def _trigger_destroy_callback; end - # Returns the value of attribute _trigger_update_callback. - # # pkg:gem/activerecord#lib/active_record/transactions.rb:453 def _trigger_update_callback; end @@ -37929,8 +34998,6 @@ module ActiveRecord::Transactions # pkg:gem/activerecord#lib/active_record/transactions.rb:484 def clear_transaction_record_state; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/transactions.rb:542 def has_transactional_callbacks?; end @@ -37949,8 +35016,6 @@ module ActiveRecord::Transactions # Determine if a transaction included an action for :create, :update, or :destroy. Used in filtering callbacks. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/transactions.rb:521 def transaction_include_any_action?(actions); end end @@ -38318,8 +35383,6 @@ end # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:6 class ActiveRecord::Type::AdapterSpecificRegistry - # @return [AdapterSpecificRegistry] a new instance of AdapterSpecificRegistry - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:7 def initialize; end @@ -38340,8 +35403,6 @@ class ActiveRecord::Type::AdapterSpecificRegistry # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:11 def initialize_copy(other); end - # Returns the value of attribute registrations. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:38 def registrations; end end @@ -38379,16 +35440,12 @@ end # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:110 class ActiveRecord::Type::DecorationRegistration < ::ActiveRecord::Type::Registration - # @return [DecorationRegistration] a new instance of DecorationRegistration - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:111 def initialize(options, klass, adapter: T.unsafe(nil)); end # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:117 def call(registry, *args, **kwargs); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:122 def matches?(*args, **kwargs); end @@ -38397,18 +35454,12 @@ class ActiveRecord::Type::DecorationRegistration < ::ActiveRecord::Type::Registr private - # Returns the value of attribute klass. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:131 def klass; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:133 def matches_options?(**kwargs); end - # Returns the value of attribute options. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:131 def options; end end @@ -38418,8 +35469,6 @@ ActiveRecord::Type::Float = ActiveModel::Type::Float # pkg:gem/activerecord#lib/active_record/type/hash_lookup_type_map.rb:5 class ActiveRecord::Type::HashLookupTypeMap - # @return [HashLookupTypeMap] a new instance of HashLookupTypeMap - # # pkg:gem/activerecord#lib/active_record/type/hash_lookup_type_map.rb:6 def initialize(parent = T.unsafe(nil)); end @@ -38432,8 +35481,6 @@ class ActiveRecord::Type::HashLookupTypeMap # pkg:gem/activerecord#lib/active_record/type/hash_lookup_type_map.rb:17 def fetch(lookup_key, *args, &block); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/hash_lookup_type_map.rb:44 def key?(key); end @@ -38443,8 +35490,6 @@ class ActiveRecord::Type::HashLookupTypeMap # pkg:gem/activerecord#lib/active_record/type/hash_lookup_type_map.rb:13 def lookup(lookup_key, *args); end - # @raise [::ArgumentError] - # # pkg:gem/activerecord#lib/active_record/type/hash_lookup_type_map.rb:23 def register_type(key, value = T.unsafe(nil), &block); end @@ -38474,15 +35519,11 @@ module ActiveRecord::Type::Internal::Timezone # pkg:gem/activerecord#lib/active_record/type/internal/timezone.rb:16 def default_timezone; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/internal/timezone.rb:12 def is_utc?; end protected - # Returns the value of attribute timezone. - # # pkg:gem/activerecord#lib/active_record/type/internal/timezone.rb:25 def timezone; end end @@ -38494,8 +35535,6 @@ class ActiveRecord::Type::Json < ::ActiveModel::Type::Value # pkg:gem/activerecord#lib/active_record/type/json.rb:38 def accessor; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/json.rb:34 def changed_in_place?(raw_old_value, new_value); end @@ -38514,8 +35553,6 @@ ActiveRecord::Type::Json::JSON_ENCODER = T.let(T.unsafe(nil), ActiveSupport::JSO # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:47 class ActiveRecord::Type::Registration - # @return [Registration] a new instance of Registration - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:48 def initialize(name, block, adapter: T.unsafe(nil), override: T.unsafe(nil)); end @@ -38525,30 +35562,20 @@ class ActiveRecord::Type::Registration # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:55 def call(_registry, *args, adapter: T.unsafe(nil), **kwargs); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:59 def matches?(type_name, *args, **kwargs); end protected - # Returns the value of attribute adapter. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:73 def adapter; end - # Returns the value of attribute block. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:73 def block; end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:73 def name; end - # Returns the value of attribute override. - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:73 def override; end @@ -38560,23 +35587,15 @@ class ActiveRecord::Type::Registration private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:95 def conflicts_with?(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:104 def has_adapter_conflict?(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:91 def matches_adapter?(adapter: T.unsafe(nil), **_arg1); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/adapter_specific_registry.rb:100 def same_priority_except_adapter?(other); end end @@ -38585,8 +35604,6 @@ end class ActiveRecord::Type::Serialized include ::ActiveModel::Type::Helpers::Mutable - # @return [Serialized] a new instance of Serialized - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:12 def initialize(subtype, coder, comparable: T.unsafe(nil)); end @@ -38596,21 +35613,15 @@ class ActiveRecord::Type::Serialized # pkg:gem/activerecord#lib/active_record/type/serialized.rb:53 def assert_valid_value(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:36 def changed_in_place?(raw_old_value, value); end - # Returns the value of attribute coder. - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:10 def coder; end # pkg:gem/activerecord#lib/active_record/type/serialized.rb:19 def deserialize(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:59 def force_equality?(value); end @@ -38620,20 +35631,14 @@ class ActiveRecord::Type::Serialized # pkg:gem/activerecord#lib/active_record/type/serialized.rb:27 def serialize(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:63 def serialized?; end - # Returns the value of attribute subtype. - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:10 def subtype; end private - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/type/serialized.rb:68 def default_value?(value); end @@ -38671,8 +35676,6 @@ class ActiveRecord::Type::Time::Value; end # pkg:gem/activerecord#lib/active_record/type/type_map.rb:7 class ActiveRecord::Type::TypeMap - # @return [TypeMap] a new instance of TypeMap - # # pkg:gem/activerecord#lib/active_record/type/type_map.rb:8 def initialize(parent = T.unsafe(nil)); end @@ -38685,8 +35688,6 @@ class ActiveRecord::Type::TypeMap # pkg:gem/activerecord#lib/active_record/type/type_map.rb:14 def lookup(lookup_key); end - # @raise [::ArgumentError] - # # pkg:gem/activerecord#lib/active_record/type/type_map.rb:24 def register_type(key, value = T.unsafe(nil), &block); end @@ -38715,8 +35716,6 @@ module ActiveRecord::TypeCaster; end # pkg:gem/activerecord#lib/active_record/type_caster/connection.rb:5 class ActiveRecord::TypeCaster::Connection - # @return [Connection] a new instance of Connection - # # pkg:gem/activerecord#lib/active_record/type_caster/connection.rb:6 def initialize(klass, table_name); end @@ -38728,16 +35727,12 @@ class ActiveRecord::TypeCaster::Connection private - # Returns the value of attribute table_name. - # # pkg:gem/activerecord#lib/active_record/type_caster/connection.rb:31 def table_name; end end # pkg:gem/activerecord#lib/active_record/type_caster/map.rb:5 class ActiveRecord::TypeCaster::Map - # @return [Map] a new instance of Map - # # pkg:gem/activerecord#lib/active_record/type_caster/map.rb:6 def initialize(klass); end @@ -38749,8 +35744,6 @@ class ActiveRecord::TypeCaster::Map private - # Returns the value of attribute klass. - # # pkg:gem/activerecord#lib/active_record/type_caster/map.rb:20 def klass; end end @@ -38789,8 +35782,6 @@ class ActiveRecord::UnknownAttributeReference < ::ActiveRecord::ActiveRecordErro # pkg:gem/activerecord#lib/active_record/migration.rb:111 class ActiveRecord::UnknownMigrationVersionError < ::ActiveRecord::MigrationError - # @return [UnknownMigrationVersionError] a new instance of UnknownMigrationVersionError - # # pkg:gem/activerecord#lib/active_record/migration.rb:112 def initialize(version = T.unsafe(nil)); end end @@ -38799,13 +35790,9 @@ end # # pkg:gem/activerecord#lib/active_record/errors.rb:479 class ActiveRecord::UnknownPrimaryKey < ::ActiveRecord::ActiveRecordError - # @return [UnknownPrimaryKey] a new instance of UnknownPrimaryKey - # # pkg:gem/activerecord#lib/active_record/errors.rb:482 def initialize(model = T.unsafe(nil), description = T.unsafe(nil)); end - # Returns the value of attribute model. - # # pkg:gem/activerecord#lib/active_record/errors.rb:480 def model; end end @@ -38860,8 +35847,6 @@ module ActiveRecord::Validations mixes_in_class_methods ::ActiveRecord::Validations::ClassMethods - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/validations.rb:77 def custom_validation_context?; end @@ -38892,26 +35877,9 @@ module ActiveRecord::Validations # \Validations with no :on option will run no matter the context. \Validations with # some :on option will only run in the specified context. # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/validations.rb:69 def valid?(context = T.unsafe(nil)); end - # Runs all the validations within the specified context. Returns +true+ if - # no errors are found, +false+ otherwise. - # - # Aliased as #validate. - # - # If the argument is +false+ (default is +nil+), the context is set to :create if - # {new_record?}[rdoc-ref:Persistence#new_record?] is +true+, and to :update if it is not. - # If the argument is an array of contexts, post.valid?([:create, :update]), the validations are - # run within multiple contexts. - # - # \Validations with no :on option will run no matter the context. \Validations with - # some :on option will only run in the specified context. - # - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/validations.rb:75 def validate(context = T.unsafe(nil)); end @@ -38923,8 +35891,6 @@ module ActiveRecord::Validations # pkg:gem/activerecord#lib/active_record/validations.rb:90 def perform_validations(options = T.unsafe(nil)); end - # @raise [RecordInvalid] - # # pkg:gem/activerecord#lib/active_record/validations.rb:86 def raise_validation_error; end end @@ -38945,8 +35911,6 @@ class ActiveRecord::Validations::AssociatedValidator < ::ActiveModel::EachValida # pkg:gem/activerecord#lib/active_record/validations/associated.rb:19 def record_validation_context_for_association(record); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/validations/associated.rb:15 def valid_object?(record, context); end end @@ -39050,11 +36014,6 @@ module ActiveRecord::Validations::ClassMethods # pkg:gem/activerecord#lib/active_record/validations/presence.rb:40 def validates_presence_of(*attr_names); end - # Validates that the specified attributes match the length restrictions supplied. - # If the attribute is an association, records that are marked for destruction are not counted. - # - # See ActiveModel::Validations::HelperMethods.validates_length_of for more information. - # # pkg:gem/activerecord#lib/active_record/validations/length.rb:23 def validates_size_of(*attr_names); end @@ -39227,8 +36186,6 @@ end # pkg:gem/activerecord#lib/active_record/validations/uniqueness.rb:5 class ActiveRecord::Validations::UniquenessValidator < ::ActiveModel::EachValidator - # @return [UniquenessValidator] a new instance of UniquenessValidator - # # pkg:gem/activerecord#lib/active_record/validations/uniqueness.rb:6 def initialize(options); end @@ -39240,8 +36197,6 @@ class ActiveRecord::Validations::UniquenessValidator < ::ActiveModel::EachValida # pkg:gem/activerecord#lib/active_record/validations/uniqueness.rb:112 def build_relation(klass, attribute, value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/validations/uniqueness.rb:83 def covered_by_unique_index?(klass, record, attribute, scope); end @@ -39261,8 +36216,6 @@ class ActiveRecord::Validations::UniquenessValidator < ::ActiveModel::EachValida # pkg:gem/activerecord#lib/active_record/validations/uniqueness.rb:134 def scope_relation(record, relation); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/active_record/validations/uniqueness.rb:70 def validation_needed?(klass, record, attribute); end end @@ -39281,8 +36234,6 @@ class ActiveRecord::WrappedDatabaseException < ::ActiveRecord::StatementInvalid; # pkg:gem/activerecord#lib/arel/errors.rb:3 module Arel class << self - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel.rb:66 def arel_node?(value); end @@ -39342,8 +36293,6 @@ class Arel::Attributes::Attribute < ::Struct include ::Arel::OrderPredications include ::Arel::Math - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/attributes/attribute.rb:26 def able_to_type_cast?; end @@ -39361,8 +36310,6 @@ end # pkg:gem/activerecord#lib/arel/errors.rb:10 class Arel::BindError < ::Arel::ArelError - # @return [BindError] a new instance of BindError - # # pkg:gem/activerecord#lib/arel/errors.rb:11 def initialize(message, sql = T.unsafe(nil)); end end @@ -39372,8 +36319,6 @@ module Arel::Collectors; end # pkg:gem/activerecord#lib/arel/collectors/bind.rb:5 class Arel::Collectors::Bind - # @return [Bind] a new instance of Bind - # # pkg:gem/activerecord#lib/arel/collectors/bind.rb:8 def initialize; end @@ -39386,15 +36331,9 @@ class Arel::Collectors::Bind # pkg:gem/activerecord#lib/arel/collectors/bind.rb:21 def add_binds(binds, proc_for_binds = T.unsafe(nil), &_arg2); end - # Returns the value of attribute retryable. - # # pkg:gem/activerecord#lib/arel/collectors/bind.rb:6 def retryable; end - # Sets the attribute retryable - # - # @param value the value to set the attribute retryable to. - # # pkg:gem/activerecord#lib/arel/collectors/bind.rb:6 def retryable=(_arg0); end @@ -39404,8 +36343,6 @@ end # pkg:gem/activerecord#lib/arel/collectors/composite.rb:5 class Arel::Collectors::Composite - # @return [Composite] a new instance of Composite - # # pkg:gem/activerecord#lib/arel/collectors/composite.rb:9 def initialize(left, right); end @@ -39418,20 +36355,12 @@ class Arel::Collectors::Composite # pkg:gem/activerecord#lib/arel/collectors/composite.rb:32 def add_binds(binds, proc_for_binds = T.unsafe(nil), &block); end - # Returns the value of attribute preparable. - # # pkg:gem/activerecord#lib/arel/collectors/composite.rb:6 def preparable; end - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # # pkg:gem/activerecord#lib/arel/collectors/composite.rb:6 def preparable=(_arg0); end - # Returns the value of attribute retryable. - # # pkg:gem/activerecord#lib/arel/collectors/composite.rb:7 def retryable; end @@ -39443,21 +36372,15 @@ class Arel::Collectors::Composite private - # Returns the value of attribute left. - # # pkg:gem/activerecord#lib/arel/collectors/composite.rb:43 def left; end - # Returns the value of attribute right. - # # pkg:gem/activerecord#lib/arel/collectors/composite.rb:43 def right; end end # pkg:gem/activerecord#lib/arel/collectors/plain_string.rb:5 class Arel::Collectors::PlainString - # @return [PlainString] a new instance of PlainString - # # pkg:gem/activerecord#lib/arel/collectors/plain_string.rb:6 def initialize; end @@ -39470,8 +36393,6 @@ end # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:7 class Arel::Collectors::SQLString < ::Arel::Collectors::PlainString - # @return [SQLString] a new instance of SQLString - # # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:10 def initialize(*_arg0); end @@ -39481,35 +36402,21 @@ class Arel::Collectors::SQLString < ::Arel::Collectors::PlainString # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:21 def add_binds(binds, proc_for_binds = T.unsafe(nil), &block); end - # Returns the value of attribute preparable. - # # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:8 def preparable; end - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:8 def preparable=(_arg0); end - # Returns the value of attribute retryable. - # # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:8 def retryable; end - # Sets the attribute retryable - # - # @param value the value to set the attribute retryable to. - # # pkg:gem/activerecord#lib/arel/collectors/sql_string.rb:8 def retryable=(_arg0); end end # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:5 class Arel::Collectors::SubstituteBinds - # @return [SubstituteBinds] a new instance of SubstituteBinds - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:8 def initialize(quoter, delegate_collector); end @@ -39522,27 +36429,15 @@ class Arel::Collectors::SubstituteBinds # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:23 def add_binds(binds, proc_for_binds = T.unsafe(nil), &_arg2); end - # Returns the value of attribute preparable. - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:6 def preparable; end - # Sets the attribute preparable - # - # @param value the value to set the attribute preparable to. - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:6 def preparable=(_arg0); end - # Returns the value of attribute retryable. - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:6 def retryable; end - # Sets the attribute retryable - # - # @param value the value to set the attribute retryable to. - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:6 def retryable=(_arg0); end @@ -39551,13 +36446,9 @@ class Arel::Collectors::SubstituteBinds private - # Returns the value of attribute delegate. - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:32 def delegate; end - # Returns the value of attribute quoter. - # # pkg:gem/activerecord#lib/arel/collectors/substitute_binds.rb:32 def quoter; end end @@ -39583,8 +36474,6 @@ end class Arel::DeleteManager < ::Arel::TreeManager include ::Arel::TreeManager::StatementMethods - # @return [DeleteManager] a new instance of DeleteManager - # # pkg:gem/activerecord#lib/arel/delete_manager.rb:7 def initialize(table = T.unsafe(nil)); end @@ -39673,8 +36562,6 @@ end # pkg:gem/activerecord#lib/arel/insert_manager.rb:4 class Arel::InsertManager < ::Arel::TreeManager - # @return [InsertManager] a new instance of InsertManager - # # pkg:gem/activerecord#lib/arel/insert_manager.rb:5 def initialize(table = T.unsafe(nil)); end @@ -39743,8 +36630,6 @@ end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:32 class Arel::Nodes::Addition < ::Arel::Nodes::InfixOperation - # @return [Addition] a new instance of Addition - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:33 def initialize(left, right); end end @@ -39760,13 +36645,9 @@ end # pkg:gem/activerecord#lib/arel/nodes/ascending.rb:5 class Arel::Nodes::Ascending < ::Arel::Nodes::Ordering - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/ascending.rb:14 def ascending?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/ascending.rb:18 def descending?; end @@ -39793,45 +36674,27 @@ class Arel::Nodes::Bin < ::Arel::Nodes::Unary; end # pkg:gem/activerecord#lib/arel/nodes/binary.rb:5 class Arel::Nodes::Binary < ::Arel::Nodes::NodeExpression - # @return [Binary] a new instance of Binary - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:8 def initialize(left, right); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:29 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:24 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/binary.rb:20 def hash; end - # Returns the value of attribute left. - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:6 def left; end - # Sets the attribute left - # - # @param value the value to set the attribute left to. - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:6 def left=(_arg0); end - # Returns the value of attribute right. - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:6 def right; end - # Sets the attribute right - # - # @param value the value to set the attribute right to. - # # pkg:gem/activerecord#lib/arel/nodes/binary.rb:6 def right=(_arg0); end @@ -39843,41 +36706,27 @@ end # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:5 class Arel::Nodes::BindParam < ::Arel::Nodes::Node - # @return [BindParam] a new instance of BindParam - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:8 def initialize(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:21 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:17 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:13 def hash; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:35 def infinite?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:23 def nil?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:39 def unboundable?; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/arel/nodes/bind_param.rb:6 def value; end @@ -39887,71 +36736,51 @@ end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:62 class Arel::Nodes::BitwiseAnd < ::Arel::Nodes::InfixOperation - # @return [BitwiseAnd] a new instance of BitwiseAnd - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:63 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/unary_operation.rb:14 class Arel::Nodes::BitwiseNot < ::Arel::Nodes::UnaryOperation - # @return [BitwiseNot] a new instance of BitwiseNot - # # pkg:gem/activerecord#lib/arel/nodes/unary_operation.rb:15 def initialize(operand); end end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:68 class Arel::Nodes::BitwiseOr < ::Arel::Nodes::InfixOperation - # @return [BitwiseOr] a new instance of BitwiseOr - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:69 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:80 class Arel::Nodes::BitwiseShiftLeft < ::Arel::Nodes::InfixOperation - # @return [BitwiseShiftLeft] a new instance of BitwiseShiftLeft - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:81 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:86 class Arel::Nodes::BitwiseShiftRight < ::Arel::Nodes::InfixOperation - # @return [BitwiseShiftRight] a new instance of BitwiseShiftRight - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:87 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:74 class Arel::Nodes::BitwiseXor < ::Arel::Nodes::InfixOperation - # @return [BitwiseXor] a new instance of BitwiseXor - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:75 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:5 class Arel::Nodes::BoundSqlLiteral < ::Arel::Nodes::NodeExpression - # @return [BoundSqlLiteral] a new instance of BoundSqlLiteral - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:8 def initialize(sql_with_placeholders, positional_binds, named_binds); end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:54 def +(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:52 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:46 def eql?(other); end @@ -39961,75 +36790,45 @@ class Arel::Nodes::BoundSqlLiteral < ::Arel::Nodes::NodeExpression # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:60 def inspect; end - # Returns the value of attribute named_binds. - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:6 def named_binds; end - # Returns the value of attribute positional_binds. - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:6 def positional_binds; end - # Returns the value of attribute sql_with_placeholders. - # # pkg:gem/activerecord#lib/arel/nodes/bound_sql_literal.rb:6 def sql_with_placeholders; end end # pkg:gem/activerecord#lib/arel/nodes/case.rb:5 class Arel::Nodes::Case < ::Arel::Nodes::NodeExpression - # @return [Case] a new instance of Case - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:8 def initialize(expression = T.unsafe(nil), default = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:46 def ==(other); end - # Returns the value of attribute case. - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:6 def case; end - # Sets the attribute case - # - # @param value the value to set the attribute case to. - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:6 def case=(_arg0); end - # Returns the value of attribute conditions. - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:6 def conditions; end - # Sets the attribute conditions - # - # @param value the value to set the attribute conditions to. - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:6 def conditions=(_arg0); end - # Returns the value of attribute default. - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:6 def default; end - # Sets the attribute default - # - # @param value the value to set the attribute default to. - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:6 def default=(_arg0); end # pkg:gem/activerecord#lib/arel/nodes/case.rb:24 def else(expression); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/case.rb:40 def eql?(other); end @@ -40050,41 +36849,27 @@ end # pkg:gem/activerecord#lib/arel/nodes/casted.rb:5 class Arel::Nodes::Casted < ::Arel::Nodes::NodeExpression - # @return [Casted] a new instance of Casted - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:9 def initialize(value, attribute); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:34 def ==(other); end - # Returns the value of attribute attribute. - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:6 def attribute; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:29 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/casted.rb:25 def hash; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:15 def nil?; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:6 def value; end - # Returns the value of attribute value. - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:7 def value_before_type_cast; end @@ -40094,26 +36879,18 @@ end # pkg:gem/activerecord#lib/arel/nodes/comment.rb:5 class Arel::Nodes::Comment < ::Arel::Nodes::Node - # @return [Comment] a new instance of Comment - # # pkg:gem/activerecord#lib/arel/nodes/comment.rb:8 def initialize(values); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/comment.rb:26 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/comment.rb:22 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/comment.rb:18 def hash; end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/arel/nodes/comment.rb:6 def values; end @@ -40125,50 +36902,36 @@ end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:44 class Arel::Nodes::Concat < ::Arel::Nodes::InfixOperation - # @return [Concat] a new instance of Concat - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:45 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:50 class Arel::Nodes::Contains < ::Arel::Nodes::InfixOperation - # @return [Contains] a new instance of Contains - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:51 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/count.rb:5 class Arel::Nodes::Count < ::Arel::Nodes::Function - # @return [Count] a new instance of Count - # # pkg:gem/activerecord#lib/arel/nodes/count.rb:6 def initialize(expr, distinct = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/arel/nodes/cte.rb:5 class Arel::Nodes::Cte < ::Arel::Nodes::Binary - # @return [Cte] a new instance of Cte - # # pkg:gem/activerecord#lib/arel/nodes/cte.rb:10 def initialize(name, relation, materialized: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/cte.rb:25 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/cte.rb:19 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/cte.rb:15 def hash; end - # Returns the value of attribute materialized. - # # pkg:gem/activerecord#lib/arel/nodes/cte.rb:8 def materialized; end @@ -40190,13 +36953,9 @@ class Arel::Nodes::Cube < ::Arel::Nodes::Unary; end # pkg:gem/activerecord#lib/arel/nodes/window.rb:103 class Arel::Nodes::CurrentRow < ::Arel::Nodes::Node - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:111 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:108 def eql?(other); end @@ -40206,129 +36965,69 @@ end # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:5 class Arel::Nodes::DeleteStatement < ::Arel::Nodes::Node - # @return [DeleteStatement] a new instance of DeleteStatement - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:8 def initialize(relation = T.unsafe(nil), wheres = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:43 def ==(other); end - # Returns the value of attribute comment. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def comment; end - # Sets the attribute comment - # - # @param value the value to set the attribute comment to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def comment=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:31 def eql?(other); end - # Returns the value of attribute groups. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def groups; end - # Sets the attribute groups - # - # @param value the value to set the attribute groups to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def groups=(_arg0); end # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:27 def hash; end - # Returns the value of attribute havings. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def havings; end - # Sets the attribute havings - # - # @param value the value to set the attribute havings to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def havings=(_arg0); end - # Returns the value of attribute key. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def key; end - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def key=(_arg0); end - # Returns the value of attribute limit. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def limit; end - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def limit=(_arg0); end - # Returns the value of attribute offset. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def offset; end - # Sets the attribute offset - # - # @param value the value to set the attribute offset to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def offset=(_arg0); end - # Returns the value of attribute orders. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def orders; end - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def orders=(_arg0); end - # Returns the value of attribute relation. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def relation; end - # Sets the attribute relation - # - # @param value the value to set the attribute relation to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def relation=(_arg0); end - # Returns the value of attribute wheres. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def wheres; end - # Sets the attribute wheres - # - # @param value the value to set the attribute wheres to. - # # pkg:gem/activerecord#lib/arel/nodes/delete_statement.rb:6 def wheres=(_arg0); end @@ -40340,13 +37039,9 @@ end # pkg:gem/activerecord#lib/arel/nodes/descending.rb:5 class Arel::Nodes::Descending < ::Arel::Nodes::Ordering - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/descending.rb:14 def ascending?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/descending.rb:18 def descending?; end @@ -40359,13 +37054,9 @@ end # pkg:gem/activerecord#lib/arel/nodes/terminal.rb:5 class Arel::Nodes::Distinct < ::Arel::Nodes::NodeExpression - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/terminal.rb:13 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/terminal.rb:10 def eql?(other); end @@ -40378,8 +37069,6 @@ class Arel::Nodes::DistinctOn < ::Arel::Nodes::Unary; end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:26 class Arel::Nodes::Division < ::Arel::Nodes::InfixOperation - # @return [Division] a new instance of Division - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:27 def initialize(left, right); end end @@ -40394,8 +37083,6 @@ class Arel::Nodes::Else < ::Arel::Nodes::Unary; end class Arel::Nodes::Equality < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/equality.rb:8 def equality?; end @@ -40411,30 +37098,18 @@ class Arel::Nodes::Exists < ::Arel::Nodes::Function; end # pkg:gem/activerecord#lib/arel/nodes/extract.rb:5 class Arel::Nodes::Extract < ::Arel::Nodes::Unary - # @return [Extract] a new instance of Extract - # # pkg:gem/activerecord#lib/arel/nodes/extract.rb:8 def initialize(expr, field); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/extract.rb:21 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/extract.rb:17 def eql?(other); end - # Returns the value of attribute field. - # # pkg:gem/activerecord#lib/arel/nodes/extract.rb:6 def field; end - # Sets the attribute field - # - # @param value the value to set the attribute field to. - # # pkg:gem/activerecord#lib/arel/nodes/extract.rb:6 def field=(_arg0); end @@ -40444,13 +37119,9 @@ end # pkg:gem/activerecord#lib/arel/nodes/false.rb:5 class Arel::Nodes::False < ::Arel::Nodes::NodeExpression - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/false.rb:13 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/false.rb:10 def eql?(other); end @@ -40471,39 +37142,27 @@ end # pkg:gem/activerecord#lib/arel/nodes/window.rb:120 class Arel::Nodes::Following < ::Arel::Nodes::Unary - # @return [Following] a new instance of Following - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:121 def initialize(expr = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:5 class Arel::Nodes::Fragments < ::Arel::Nodes::Node - # @return [Fragments] a new instance of Fragments - # # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:8 def initialize(values = T.unsafe(nil)); end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:22 def +(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:32 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:28 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:18 def hash; end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/arel/nodes/fragments.rb:6 def values; end @@ -40521,42 +37180,24 @@ class Arel::Nodes::Function < ::Arel::Nodes::NodeExpression include ::Arel::WindowPredications include ::Arel::FilterPredications - # @return [Function] a new instance of Function - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:11 def initialize(expr); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:26 def ==(other); end - # Returns the value of attribute distinct. - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:9 def distinct; end - # Sets the attribute distinct - # - # @param value the value to set the attribute distinct to. - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:9 def distinct=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:21 def eql?(other); end - # Returns the value of attribute expressions. - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:9 def expressions; end - # Sets the attribute expressions - # - # @param value the value to set the attribute expressions to. - # # pkg:gem/activerecord#lib/arel/nodes/function.rb:9 def expressions=(_arg0); end @@ -40597,31 +37238,21 @@ class Arel::Nodes::GroupingSet < ::Arel::Nodes::Unary; end # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:5 class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node - # @return [HomogeneousIn] a new instance of HomogeneousIn - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:8 def initialize(values, attribute, type); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:21 def ==(other); end - # Returns the value of attribute attribute. - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:6 def attribute; end # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:39 def casted_values; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:18 def eql?(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:23 def equality?; end @@ -40643,13 +37274,9 @@ class Arel::Nodes::HomogeneousIn < ::Arel::Nodes::Node # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:35 def right; end - # Returns the value of attribute type. - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:6 def type; end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/arel/nodes/homogeneous_in.rb:6 def values; end @@ -40663,8 +37290,6 @@ end class Arel::Nodes::In < ::Arel::Nodes::Binary include ::Arel::Nodes::FetchAttribute - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/in.rb:8 def equality?; end @@ -40674,13 +37299,9 @@ end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:5 class Arel::Nodes::InfixOperation < ::Arel::Nodes::Binary - # @return [InfixOperation] a new instance of InfixOperation - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:14 def initialize(operator, left, right); end - # Returns the value of attribute operator. - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:12 def operator; end end @@ -40690,69 +37311,39 @@ class Arel::Nodes::InnerJoin < ::Arel::Nodes::Join; end # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:5 class Arel::Nodes::InsertStatement < ::Arel::Nodes::Node - # @return [InsertStatement] a new instance of InsertStatement - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:8 def initialize(relation = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:34 def ==(other); end - # Returns the value of attribute columns. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def columns; end - # Sets the attribute columns - # - # @param value the value to set the attribute columns to. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def columns=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:27 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:23 def hash; end - # Returns the value of attribute relation. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def relation; end - # Sets the attribute relation - # - # @param value the value to set the attribute relation to. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def relation=(_arg0); end - # Returns the value of attribute select. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def select; end - # Sets the attribute select - # - # @param value the value to set the attribute select to. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def select=(_arg0); end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def values; end - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # # pkg:gem/activerecord#lib/arel/nodes/insert_statement.rb:6 def values=(_arg0); end @@ -40790,13 +37381,9 @@ class Arel::Nodes::Join < ::Arel::Nodes::Binary; end # # pkg:gem/activerecord#lib/arel/nodes/join_source.rb:10 class Arel::Nodes::JoinSource < ::Arel::Nodes::Binary - # @return [JoinSource] a new instance of JoinSource - # # pkg:gem/activerecord#lib/arel/nodes/join_source.rb:11 def initialize(single_source, joinop = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/join_source.rb:15 def empty?; end end @@ -40831,25 +37418,15 @@ class Arel::Nodes::Lock < ::Arel::Nodes::Unary; end # pkg:gem/activerecord#lib/arel/nodes/matches.rb:5 class Arel::Nodes::Matches < ::Arel::Nodes::Binary - # @return [Matches] a new instance of Matches - # # pkg:gem/activerecord#lib/arel/nodes/matches.rb:9 def initialize(left, right, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end - # Returns the value of attribute case_sensitive. - # # pkg:gem/activerecord#lib/arel/nodes/matches.rb:7 def case_sensitive; end - # Sets the attribute case_sensitive - # - # @param value the value to set the attribute case_sensitive to. - # # pkg:gem/activerecord#lib/arel/nodes/matches.rb:7 def case_sensitive=(_arg0); end - # Returns the value of attribute escape. - # # pkg:gem/activerecord#lib/arel/nodes/matches.rb:6 def escape; end end @@ -40862,74 +37439,48 @@ class Arel::Nodes::Min < ::Arel::Nodes::Function; end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:20 class Arel::Nodes::Multiplication < ::Arel::Nodes::InfixOperation - # @return [Multiplication] a new instance of Multiplication - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:21 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:5 class Arel::Nodes::NamedFunction < ::Arel::Nodes::Function - # @return [NamedFunction] a new instance of NamedFunction - # # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:8 def initialize(name, expr); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:20 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:17 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:13 def hash; end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:6 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activerecord#lib/arel/nodes/named_function.rb:6 def name=(_arg0); end end # pkg:gem/activerecord#lib/arel/nodes/window.rb:68 class Arel::Nodes::NamedWindow < ::Arel::Nodes::Window - # @return [NamedWindow] a new instance of NamedWindow - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:71 def initialize(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:88 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:85 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/window.rb:81 def hash; end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:69 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:69 def name=(_arg0); end @@ -40941,23 +37492,15 @@ end # pkg:gem/activerecord#lib/arel/nodes/nary.rb:5 class Arel::Nodes::Nary < ::Arel::Nodes::NodeExpression - # @return [Nary] a new instance of Nary - # # pkg:gem/activerecord#lib/arel/nodes/nary.rb:8 def initialize(children); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/nary.rb:33 def ==(other); end - # Returns the value of attribute children. - # # pkg:gem/activerecord#lib/arel/nodes/nary.rb:6 def children; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/nary.rb:29 def eql?(other); end @@ -41095,8 +37638,6 @@ class Arel::Nodes::Node # pkg:gem/activerecord#lib/arel/nodes/node.rb:135 def and(right); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/node.rb:158 def equality?; end @@ -41197,8 +37738,6 @@ class Arel::Nodes::OuterJoin < ::Arel::Nodes::Join; end # pkg:gem/activerecord#lib/arel/nodes/over.rb:5 class Arel::Nodes::Over < ::Arel::Nodes::Binary - # @return [Over] a new instance of Over - # # pkg:gem/activerecord#lib/arel/nodes/over.rb:8 def initialize(left, right = T.unsafe(nil)); end @@ -41208,29 +37747,21 @@ end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:56 class Arel::Nodes::Overlaps < ::Arel::Nodes::InfixOperation - # @return [Overlaps] a new instance of Overlaps - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:57 def initialize(left, right); end end # pkg:gem/activerecord#lib/arel/nodes/window.rb:114 class Arel::Nodes::Preceding < ::Arel::Nodes::Unary - # @return [Preceding] a new instance of Preceding - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:115 def initialize(expr = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/arel/nodes/casted.rb:37 class Arel::Nodes::Quoted < ::Arel::Nodes::Unary - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:43 def infinite?; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/casted.rb:41 def nil?; end @@ -41243,28 +37774,18 @@ end # pkg:gem/activerecord#lib/arel/nodes/window.rb:97 class Arel::Nodes::Range < ::Arel::Nodes::Unary - # @return [Range] a new instance of Range - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:98 def initialize(expr = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/arel/nodes/regexp.rb:5 class Arel::Nodes::Regexp < ::Arel::Nodes::Binary - # @return [Regexp] a new instance of Regexp - # # pkg:gem/activerecord#lib/arel/nodes/regexp.rb:8 def initialize(left, right, case_sensitive = T.unsafe(nil)); end - # Returns the value of attribute case_sensitive. - # # pkg:gem/activerecord#lib/arel/nodes/regexp.rb:6 def case_sensitive; end - # Sets the attribute case_sensitive - # - # @param value the value to set the attribute case_sensitive to. - # # pkg:gem/activerecord#lib/arel/nodes/regexp.rb:6 def case_sensitive=(_arg0); end end @@ -41277,38 +37798,24 @@ class Arel::Nodes::RollUp < ::Arel::Nodes::Unary; end # pkg:gem/activerecord#lib/arel/nodes/window.rb:91 class Arel::Nodes::Rows < ::Arel::Nodes::Unary - # @return [Rows] a new instance of Rows - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:92 def initialize(expr = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:5 class Arel::Nodes::SelectCore < ::Arel::Nodes::Node - # @return [SelectCore] a new instance of SelectCore - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:9 def initialize(relation = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:64 def ==(other); end - # Returns the value of attribute comment. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def comment; end - # Sets the attribute comment - # - # @param value the value to set the attribute comment to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def comment=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:52 def eql?(other); end @@ -41324,102 +37831,54 @@ class Arel::Nodes::SelectCore < ::Arel::Nodes::Node # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:32 def froms=(value); end - # Returns the value of attribute groups. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def groups; end - # Sets the attribute groups - # - # @param value the value to set the attribute groups to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def groups=(_arg0); end # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:45 def hash; end - # Returns the value of attribute havings. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def havings; end - # Sets the attribute havings - # - # @param value the value to set the attribute havings to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def havings=(_arg0); end - # Returns the value of attribute optimizer_hints. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def optimizer_hints; end - # Sets the attribute optimizer_hints - # - # @param value the value to set the attribute optimizer_hints to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def optimizer_hints=(_arg0); end - # Returns the value of attribute projections. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def projections; end - # Sets the attribute projections - # - # @param value the value to set the attribute projections to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def projections=(_arg0); end - # Returns the value of attribute set_quantifier. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def set_quantifier; end - # Sets the attribute set_quantifier - # - # @param value the value to set the attribute set_quantifier to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def set_quantifier=(_arg0); end - # Returns the value of attribute source. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def source; end - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:7 def source=(_arg0); end - # Returns the value of attribute wheres. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def wheres; end - # Sets the attribute wheres - # - # @param value the value to set the attribute wheres to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def wheres=(_arg0); end - # Returns the value of attribute windows. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def windows; end - # Sets the attribute windows - # - # @param value the value to set the attribute windows to. - # # pkg:gem/activerecord#lib/arel/nodes/select_core.rb:6 def windows=(_arg0); end @@ -41431,86 +37890,48 @@ end # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:5 class Arel::Nodes::SelectStatement < ::Arel::Nodes::NodeExpression - # @return [SelectStatement] a new instance of SelectStatement - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:9 def initialize(relation = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:38 def ==(other); end - # Returns the value of attribute cores. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:6 def cores; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:29 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:25 def hash; end - # Returns the value of attribute limit. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def limit; end - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def limit=(_arg0); end - # Returns the value of attribute lock. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def lock; end - # Sets the attribute lock - # - # @param value the value to set the attribute lock to. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def lock=(_arg0); end - # Returns the value of attribute offset. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def offset; end - # Sets the attribute offset - # - # @param value the value to set the attribute offset to. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def offset=(_arg0); end - # Returns the value of attribute orders. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def orders; end - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def orders=(_arg0); end - # Returns the value of attribute with. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def with; end - # Sets the attribute with - # - # @param value the value to set the attribute with to. - # # pkg:gem/activerecord#lib/arel/nodes/select_statement.rb:7 def with=(_arg0); end @@ -41527,13 +37948,9 @@ class Arel::Nodes::SqlLiteral < ::String include ::Arel::AliasPredication include ::Arel::OrderPredications - # @return [SqlLiteral] a new instance of SqlLiteral - # # pkg:gem/activerecord#lib/arel/nodes/sql_literal.rb:13 def initialize(string, retryable: T.unsafe(nil)); end - # @raise [ArgumentError] - # # pkg:gem/activerecord#lib/arel/nodes/sql_literal.rb:25 def +(other); end @@ -41543,24 +37960,18 @@ class Arel::Nodes::SqlLiteral < ::String # pkg:gem/activerecord#lib/arel/nodes/sql_literal.rb:22 def fetch_attribute(&_arg0); end - # Returns the value of attribute retryable. - # # pkg:gem/activerecord#lib/arel/nodes/sql_literal.rb:11 def retryable; end end # pkg:gem/activerecord#lib/arel/nodes/string_join.rb:5 class Arel::Nodes::StringJoin < ::Arel::Nodes::Join - # @return [StringJoin] a new instance of StringJoin - # # pkg:gem/activerecord#lib/arel/nodes/string_join.rb:6 def initialize(left, right = T.unsafe(nil)); end end # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:38 class Arel::Nodes::Subtraction < ::Arel::Nodes::InfixOperation - # @return [Subtraction] a new instance of Subtraction - # # pkg:gem/activerecord#lib/arel/nodes/infix_operation.rb:39 def initialize(left, right); end end @@ -41573,8 +37984,6 @@ class Arel::Nodes::TableAlias < ::Arel::Nodes::Binary # pkg:gem/activerecord#lib/arel/nodes/table_alias.rb:10 def [](name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/table_alias.rb:26 def able_to_type_cast?; end @@ -41602,13 +38011,9 @@ end # pkg:gem/activerecord#lib/arel/nodes/true.rb:5 class Arel::Nodes::True < ::Arel::Nodes::NodeExpression - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/true.rb:13 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/true.rb:10 def eql?(other); end @@ -41618,51 +38023,33 @@ end # pkg:gem/activerecord#lib/arel/nodes/unary.rb:5 class Arel::Nodes::Unary < ::Arel::Nodes::NodeExpression - # @return [Unary] a new instance of Unary - # # pkg:gem/activerecord#lib/arel/nodes/unary.rb:9 def initialize(expr); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/unary.rb:22 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/unary.rb:18 def eql?(other); end - # Returns the value of attribute expr. - # # pkg:gem/activerecord#lib/arel/nodes/unary.rb:6 def expr; end - # Sets the attribute expr - # - # @param value the value to set the attribute expr to. - # # pkg:gem/activerecord#lib/arel/nodes/unary.rb:6 def expr=(_arg0); end # pkg:gem/activerecord#lib/arel/nodes/unary.rb:14 def hash; end - # Returns the value of attribute expr. - # # pkg:gem/activerecord#lib/arel/nodes/unary.rb:7 def value; end end # pkg:gem/activerecord#lib/arel/nodes/unary_operation.rb:5 class Arel::Nodes::UnaryOperation < ::Arel::Nodes::Unary - # @return [UnaryOperation] a new instance of UnaryOperation - # # pkg:gem/activerecord#lib/arel/nodes/unary_operation.rb:8 def initialize(operator, operand); end - # Returns the value of attribute operator. - # # pkg:gem/activerecord#lib/arel/nodes/unary_operation.rb:6 def operator; end end @@ -41693,141 +38080,75 @@ end # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:5 class Arel::Nodes::UpdateStatement < ::Arel::Nodes::Node - # @return [UpdateStatement] a new instance of UpdateStatement - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:8 def initialize(relation = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:45 def ==(other); end - # Returns the value of attribute comment. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def comment; end - # Sets the attribute comment - # - # @param value the value to set the attribute comment to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def comment=(_arg0); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:32 def eql?(other); end - # Returns the value of attribute groups. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def groups; end - # Sets the attribute groups - # - # @param value the value to set the attribute groups to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def groups=(_arg0); end # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:28 def hash; end - # Returns the value of attribute havings. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def havings; end - # Sets the attribute havings - # - # @param value the value to set the attribute havings to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def havings=(_arg0); end - # Returns the value of attribute key. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def key; end - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def key=(_arg0); end - # Returns the value of attribute limit. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def limit; end - # Sets the attribute limit - # - # @param value the value to set the attribute limit to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def limit=(_arg0); end - # Returns the value of attribute offset. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def offset; end - # Sets the attribute offset - # - # @param value the value to set the attribute offset to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def offset=(_arg0); end - # Returns the value of attribute orders. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def orders; end - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def orders=(_arg0); end - # Returns the value of attribute relation. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def relation; end - # Sets the attribute relation - # - # @param value the value to set the attribute relation to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def relation=(_arg0); end - # Returns the value of attribute values. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def values; end - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def values=(_arg0); end - # Returns the value of attribute wheres. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def wheres; end - # Sets the attribute wheres - # - # @param value the value to set the attribute wheres to. - # # pkg:gem/activerecord#lib/arel/nodes/update_statement.rb:6 def wheres=(_arg0); end @@ -41848,33 +38169,21 @@ class Arel::Nodes::When < ::Arel::Nodes::Binary; end # pkg:gem/activerecord#lib/arel/nodes/window.rb:5 class Arel::Nodes::Window < ::Arel::Nodes::Node - # @return [Window] a new instance of Window - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:8 def initialize; end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:65 def ==(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:59 def eql?(other); end # pkg:gem/activerecord#lib/arel/nodes/window.rb:30 def frame(expr); end - # Returns the value of attribute framing. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:6 def framing; end - # Sets the attribute framing - # - # @param value the value to set the attribute framing to. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:6 def framing=(_arg0); end @@ -41884,30 +38193,18 @@ class Arel::Nodes::Window < ::Arel::Nodes::Node # pkg:gem/activerecord#lib/arel/nodes/window.rb:14 def order(*expr); end - # Returns the value of attribute orders. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:6 def orders; end - # Sets the attribute orders - # - # @param value the value to set the attribute orders to. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:6 def orders=(_arg0); end # pkg:gem/activerecord#lib/arel/nodes/window.rb:22 def partition(*expr); end - # Returns the value of attribute partitions. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:6 def partitions; end - # Sets the attribute partitions - # - # @param value the value to set the attribute partitions to. - # # pkg:gem/activerecord#lib/arel/nodes/window.rb:6 def partitions=(_arg0); end @@ -42074,21 +38371,15 @@ module Arel::Predications # pkg:gem/activerecord#lib/arel/predications.rb:232 def grouping_any(method_id, others, *extras); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/predications.rb:248 def infinity?(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/predications.rb:256 def open_ended?(value); end # pkg:gem/activerecord#lib/arel/predications.rb:244 def quoted_node(other); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/predications.rb:252 def unboundable?(value); end end @@ -42097,8 +38388,6 @@ end class Arel::SelectManager < ::Arel::TreeManager include ::Arel::Crud - # @return [SelectManager] a new instance of SelectManager - # # pkg:gem/activerecord#lib/arel/select_manager.rb:9 def initialize(table = T.unsafe(nil)); end @@ -42238,29 +38527,21 @@ class Arel::Table include ::Arel::FactoryMethods include ::Arel::AliasPredication - # @return [Table] a new instance of Table - # # pkg:gem/activerecord#lib/arel/table.rb:14 def initialize(name, as: T.unsafe(nil), klass: T.unsafe(nil), type_caster: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/table.rb:100 def ==(other); end # pkg:gem/activerecord#lib/arel/table.rb:82 def [](name, table = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/table.rb:110 def able_to_type_cast?; end # pkg:gem/activerecord#lib/arel/table.rb:30 def alias(name = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/table.rb:95 def eql?(other); end @@ -42279,15 +38560,9 @@ class Arel::Table # pkg:gem/activerecord#lib/arel/table.rb:38 def join(relation, klass = T.unsafe(nil)); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/arel/table.rb:11 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activerecord#lib/arel/table.rb:11 def name=(_arg0); end @@ -42303,8 +38578,6 @@ class Arel::Table # pkg:gem/activerecord#lib/arel/table.rb:74 def skip(amount); end - # Returns the value of attribute table_alias. - # # pkg:gem/activerecord#lib/arel/table.rb:12 def table_alias; end @@ -42322,21 +38595,13 @@ class Arel::Table private - # Returns the value of attribute type_caster. - # # pkg:gem/activerecord#lib/arel/table.rb:115 def type_caster; end class << self - # Returns the value of attribute engine. - # # pkg:gem/activerecord#lib/arel/table.rb:9 def engine; end - # Sets the attribute engine - # - # @param value the value to set the attribute engine to. - # # pkg:gem/activerecord#lib/arel/table.rb:9 def engine=(_arg0); end end @@ -42346,8 +38611,6 @@ end class Arel::TreeManager include ::Arel::FactoryMethods - # Returns the value of attribute ast. - # # pkg:gem/activerecord#lib/arel/tree_manager.rb:45 def ast; end @@ -42391,8 +38654,6 @@ end class Arel::UpdateManager < ::Arel::TreeManager include ::Arel::TreeManager::StatementMethods - # @return [UpdateManager] a new instance of UpdateManager - # # pkg:gem/activerecord#lib/arel/update_manager.rb:7 def initialize(table = T.unsafe(nil)); end @@ -42422,8 +38683,6 @@ module Arel::Visitors; end # pkg:gem/activerecord#lib/arel/visitors/dot.rb:5 class Arel::Visitors::Dot < ::Arel::Visitors::Visitor - # @return [Dot] a new instance of Dot - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:19 def initialize; end @@ -42471,8 +38730,6 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/dot.rb:76 def visit_Arel_Nodes_Count(o); end - # intentionally left blank - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:105 def visit_Arel_Nodes_CurrentRow(o); end @@ -42614,44 +38871,24 @@ class Arel::Visitors::Dot::Edge < ::Struct; end # pkg:gem/activerecord#lib/arel/visitors/dot.rb:6 class Arel::Visitors::Dot::Node - # @return [Node] a new instance of Node - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:9 def initialize(name, id, fields = T.unsafe(nil)); end - # Returns the value of attribute fields. - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:7 def fields; end - # Sets the attribute fields - # - # @param value the value to set the attribute fields to. - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:7 def fields=(_arg0); end - # Returns the value of attribute id. - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:7 def id; end - # Sets the attribute id - # - # @param value the value to set the attribute id to. - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:7 def id=(_arg0); end - # Returns the value of attribute name. - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:7 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activerecord#lib/arel/visitors/dot.rb:7 def name=(_arg0); end end @@ -42666,10 +38903,6 @@ class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql # pkg:gem/activerecord#lib/arel/visitors/mysql.rb:93 def build_subselect(key, o); end - # In the simple case, MySQL allows us to place JOINs directly into the UPDATE - # query. However, this does not allow for LIMIT, OFFSET and ORDER. To support - # these, we must use a subquery. - # # pkg:gem/activerecord#lib/arel/visitors/mysql.rb:89 def prepare_delete_statement(o); end @@ -42824,8 +39057,6 @@ end # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:11 class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor - # @return [ToSql] a new instance of ToSql - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:12 def initialize(connection); end @@ -42859,18 +39090,12 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:971 def grouping_parentheses(o, collector, always_wrap_selects = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:907 def has_group_by_and_having?(o); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:899 def has_join_sources?(o); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:903 def has_limit_or_offset_or_orders?(o); end @@ -42889,10 +39114,6 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:881 def maybe_visit(thing, collector); end - # The default strategy for an UPDATE with joins is to use a subquery. This doesn't work - # on MySQL (even when aliasing the tables), but MySQL allows using JOIN directly in - # an UPDATE statement, so in the MySQL visitor we redefine this to do that. - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:930 def prepare_delete_statement(o); end @@ -42912,34 +39133,24 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:862 def quote_table_name(name); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:982 def require_parentheses?(o); end # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:872 def sanitize_as_sql_comment(value); end - # @return [Boolean] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:895 def unboundable?(value); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:818 def unsupported(o, collector); end # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:746 def visit_ActiveModel_Attribute(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:822 def visit_ActiveSupport_Multibyte_Chars(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:823 def visit_ActiveSupport_StringInquirer(o, collector); end @@ -43000,8 +39211,6 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:186 def visit_Arel_Nodes_Distinct(o, collector); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:190 def visit_Arel_Nodes_DistinctOn(o, collector); end @@ -43113,8 +39322,6 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:595 def visit_Arel_Nodes_NotIn(o, collector); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:514 def visit_Arel_Nodes_NotRegexp(o, collector); end @@ -43153,8 +39360,6 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:263 def visit_Arel_Nodes_Range(o, collector); end - # @raise [NotImplementedError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:510 def visit_Arel_Nodes_Regexp(o, collector); end @@ -43230,69 +39435,45 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:848 def visit_Array(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:824 def visit_BigDecimal(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:825 def visit_Class(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:826 def visit_Date(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:827 def visit_DateTime(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:828 def visit_FalseClass(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:829 def visit_Float(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:830 def visit_Hash(o, collector); end # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:814 def visit_Integer(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:831 def visit_NilClass(o, collector); end # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:851 def visit_Set(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:832 def visit_String(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:833 def visit_Symbol(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:834 def visit_Time(o, collector); end - # @raise [UnsupportedVisitError] - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:835 def visit_TrueClass(o, collector); end end @@ -43302,16 +39483,12 @@ Arel::Visitors::ToSql::BIND_BLOCK = T.let(T.unsafe(nil), Proc) # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:5 class Arel::Visitors::UnsupportedVisitError < ::StandardError - # @return [UnsupportedVisitError] a new instance of UnsupportedVisitError - # # pkg:gem/activerecord#lib/arel/visitors/to_sql.rb:6 def initialize(object); end end # pkg:gem/activerecord#lib/arel/visitors/visitor.rb:5 class Arel::Visitors::Visitor - # @return [Visitor] a new instance of Visitor - # # pkg:gem/activerecord#lib/arel/visitors/visitor.rb:6 def initialize; end @@ -43320,8 +39497,6 @@ class Arel::Visitors::Visitor private - # Returns the value of attribute dispatch. - # # pkg:gem/activerecord#lib/arel/visitors/visitor.rb:15 def dispatch; end diff --git a/sorbet/rbi/gems/activeresource@6.2.0.rbi b/sorbet/rbi/gems/activeresource@6.2.0.rbi index 8907be054..b9e6abfb4 100644 --- a/sorbet/rbi/gems/activeresource@6.2.0.rbi +++ b/sorbet/rbi/gems/activeresource@6.2.0.rbi @@ -141,16 +141,12 @@ module ActiveResource::Associations::Builder; end # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:4 class ActiveResource::Associations::Builder::Association - # @return [Association] a new instance of Association - # # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:18 def initialize(model, name, options); end # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:22 def build; end - # Returns the value of attribute klass. - # # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:12 def klass; end @@ -163,18 +159,12 @@ class ActiveResource::Associations::Builder::Association # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:10 def macro?; end - # Returns the value of attribute model. - # # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:12 def model; end - # Returns the value of attribute name. - # # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:12 def name; end - # Returns the value of attribute options. - # # pkg:gem/activeresource#lib/active_resource/associations/builder/association.rb:12 def options; end @@ -630,8 +620,6 @@ class ActiveResource::Base # my_other_course = Course.new(:name => "Philosophy: Reason and Being", :lecturer => "Ralph Cling") # my_other_course.save # - # @return [Base] a new instance of Base - # # pkg:gem/activeresource#lib/active_resource/base.rb:1239 def initialize(attributes = T.unsafe(nil), persisted = T.unsafe(nil)); end @@ -821,8 +809,6 @@ class ActiveResource::Base # Tests for equality (delegates to ==). # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1349 def eql?(other); end @@ -843,8 +829,6 @@ class ActiveResource::Base # Person.delete(guys_id) # that_guy.exists? # => false # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1448 def exists?; end @@ -911,9 +895,6 @@ class ActiveResource::Base # pkg:gem/activeresource#lib/active_resource/base.rb:1497 def load(attributes, remove_root = T.unsafe(nil), persisted = T.unsafe(nil)); end - # :singleton-method: - # The logger for diagnosing and tracing Active Resource calls. - # # pkg:gem/activeresource#lib/active_resource/base.rb:323 def logger; end @@ -932,25 +913,9 @@ class ActiveResource::Base # is_new.save # is_new.new? # => false # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1291 def new?; end - # Returns +true+ if this object hasn't yet been saved, otherwise, returns +false+. - # - # ==== Examples - # not_new = Computer.create(:brand => 'Apple', :make => 'MacBook', :vendor => 'MacMall') - # not_new.new? # => false - # - # is_new = Computer.new(:brand => 'IBM', :make => 'Thinkpad', :vendor => 'IBM') - # is_new.new? # => true - # - # is_new.save - # is_new.new? # => false - # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1294 def new_record?; end @@ -969,8 +934,6 @@ class ActiveResource::Base # not_persisted.save # not_persisted.persisted? # => true # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1308 def persisted?; end @@ -1137,8 +1100,6 @@ class ActiveResource::Base private - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1709 def const_valid?(*const_args); end @@ -1170,15 +1131,11 @@ class ActiveResource::Base # +name+ attribute can answer true to my_person.respond_to?(:name), my_person.respond_to?(:name=), and # my_person.respond_to?(:name?). # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1571 def respond_to_missing?(method, include_priv = T.unsafe(nil)); end # Determine whether the response is allowed to have a body per HTTP 1.1 spec section 4.4.1 # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1658 def response_code_allows_body?(c); end @@ -1396,10 +1353,6 @@ class ActiveResource::Base # pkg:gem/activeresource#lib/active_resource/base.rb:714 def collection_name; end - # Sets the attribute collection_name - # - # @param value the value to set the attribute collection_name to. - # # pkg:gem/activeresource#lib/active_resource/base.rb:712 def collection_name=(_arg0); end @@ -1535,10 +1488,6 @@ class ActiveResource::Base # pkg:gem/activeresource#lib/active_resource/base.rb:708 def element_name; end - # Sets the attribute element_name - # - # @param value the value to set the attribute element_name to. - # # pkg:gem/activeresource#lib/active_resource/base.rb:706 def element_name=(_arg0); end @@ -1608,8 +1557,6 @@ class ActiveResource::Base # # Note.exists(1349) # => false # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1100 def exists?(id, options = T.unsafe(nil)); end @@ -1831,10 +1778,6 @@ class ActiveResource::Base # pkg:gem/activeresource#lib/active_resource/base.rb:720 def primary_key; end - # Sets the attribute primary_key - # - # @param value the value to set the attribute primary_key to. - # # pkg:gem/activeresource#lib/active_resource/base.rb:718 def primary_key=(_arg0); end @@ -1952,35 +1895,18 @@ class ActiveResource::Base # The keys/values can be strings or symbols. They will be converted to # strings. # - # @raise [ArgumentError] - # # pkg:gem/activeresource#lib/active_resource/base.rb:434 def schema=(the_schema); end - # Sets the attribute collection_name - # - # @param value the value to set the attribute collection_name to. - # # pkg:gem/activeresource#lib/active_resource/base.rb:773 def set_collection_name(_arg0); end - # Sets the attribute element_name - # - # @param value the value to set the attribute element_name to. - # # pkg:gem/activeresource#lib/active_resource/base.rb:772 def set_element_name(_arg0); end - # Sets the \prefix for a resource's nested URL (e.g., prefix/collectionname/1.json). - # Default value is site.path. - # # pkg:gem/activeresource#lib/active_resource/base.rb:770 def set_prefix(value = T.unsafe(nil)); end - # Sets the attribute primary_key - # - # @param value the value to set the attribute primary_key to. - # # pkg:gem/activeresource#lib/active_resource/base.rb:914 def set_primary_key(_arg0); end @@ -2036,8 +1962,6 @@ class ActiveResource::Base # pkg:gem/activeresource#lib/active_resource/base.rb:525 def user=(user); end - # @raise [ArgumentError] - # # pkg:gem/activeresource#lib/active_resource/base.rb:1068 def where(clauses = T.unsafe(nil)); end @@ -2241,48 +2165,30 @@ class ActiveResource::ClientError < ::ActiveResource::ConnectionError; end # # pkg:gem/activeresource#lib/active_resource/coder.rb:50 class ActiveResource::Coder - # @return [Coder] a new instance of Coder - # # pkg:gem/activeresource#lib/active_resource/coder.rb:53 def initialize(resource_class, encoder_method = T.unsafe(nil), &block); end # Serializes a resource value to a value that will be stored in the database. # Returns nil when passed nil # - # @raise [ArgumentError] - # # pkg:gem/activeresource#lib/active_resource/coder.rb:60 def dump(value); end - # Returns the value of attribute encoder. - # # pkg:gem/activeresource#lib/active_resource/coder.rb:51 def encoder; end - # Sets the attribute encoder - # - # @param value the value to set the attribute encoder to. - # # pkg:gem/activeresource#lib/active_resource/coder.rb:51 def encoder=(_arg0); end # Deserializes a value from the database to a resource instance. # Returns nil when passed nil # - # @raise [ArgumentError] - # # pkg:gem/activeresource#lib/active_resource/coder.rb:69 def load(value); end - # Returns the value of attribute resource_class. - # # pkg:gem/activeresource#lib/active_resource/coder.rb:51 def resource_class; end - # Sets the attribute resource_class - # - # @param value the value to set the attribute resource_class to. - # # pkg:gem/activeresource#lib/active_resource/coder.rb:51 def resource_class=(_arg0); end end @@ -2336,8 +2242,6 @@ class ActiveResource::Collection # The initialize method will receive the ActiveResource::Formats parsed result # and should set @elements. # - # @return [Collection] a new instance of Collection - # # pkg:gem/activeresource#lib/active_resource/collection.rb:59 def initialize(elements = T.unsafe(nil)); end @@ -2440,9 +2344,6 @@ class ActiveResource::Collection # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def delete_if(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 - def detect(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def difference(*_arg0, **_arg1, &_arg2); end @@ -2489,9 +2390,6 @@ class ActiveResource::Collection # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def fetch(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 - def fetch_values(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def fifth(*_arg0, **_arg1, &_arg2); end @@ -2504,9 +2402,6 @@ class ActiveResource::Collection # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def filter!(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 - def find(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def find_index(*_arg0, **_arg1, &_arg2); end @@ -2531,9 +2426,6 @@ class ActiveResource::Collection # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def fourth(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 - def freeze(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def from(*_arg0, **_arg1, &_arg2); end @@ -2680,9 +2572,6 @@ class ActiveResource::Collection # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def reverse_each(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 - def rfind(*_arg0, **_arg1, &_arg2); end - # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def rindex(*_arg0, **_arg1, &_arg2); end @@ -2809,8 +2698,6 @@ class ActiveResource::Collection # pkg:gem/activeresource#lib/active_resource/collection.rb:10 def values_at(*_arg0, **_arg1, &_arg2); end - # @raise [ArgumentError] - # # pkg:gem/activeresource#lib/active_resource/collection.rb:88 def where(clauses = T.unsafe(nil)); end @@ -2836,14 +2723,9 @@ class ActiveResource::Connection # The +site+ parameter is required and will set the +site+ # attribute to the URI for the remote resource service. # - # @raise [ArgumentError] - # @return [Connection] a new instance of Connection - # # pkg:gem/activeresource#lib/active_resource/connection.rb:33 def initialize(site, format = T.unsafe(nil), logger: T.unsafe(nil)); end - # Returns the value of attribute auth_type. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def auth_type; end @@ -2852,7 +2734,7 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:64 def auth_type=(auth_type); end - # Returns the value of attribute bearer_token. + # Sets the bearer token for remote service. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def bearer_token; end @@ -2868,15 +2750,9 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:88 def delete(path, headers = T.unsafe(nil)); end - # Returns the value of attribute format. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:23 def format; end - # Sets the attribute format - # - # @param value the value to set the attribute format to. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:23 def format=(_arg0); end @@ -2892,19 +2768,13 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:112 def head(path, headers = T.unsafe(nil)); end - # Returns the value of attribute logger. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:23 def logger; end - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:23 def logger=(_arg0); end - # Returns the value of attribute open_timeout. + # Sets the number of seconds after which HTTP connects to the remote service should time out. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def open_timeout; end @@ -2914,7 +2784,7 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:72 def open_timeout=(_arg0); end - # Returns the value of attribute password. + # Sets the password for remote service. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def password; end @@ -2936,8 +2806,6 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:106 def post(path, body = T.unsafe(nil), headers = T.unsafe(nil)); end - # Returns the value of attribute proxy. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def proxy; end @@ -2952,7 +2820,7 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:100 def put(path, body = T.unsafe(nil), headers = T.unsafe(nil)); end - # Returns the value of attribute read_timeout. + # Sets the number of seconds after which HTTP read requests to the remote service should time out. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def read_timeout; end @@ -2962,8 +2830,6 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:75 def read_timeout=(_arg0); end - # Returns the value of attribute site. - # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def site; end @@ -2972,7 +2838,7 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:42 def site=(site); end - # Returns the value of attribute ssl_options. + # Hash of options applied to Net::HTTP instance when +site+ protocol is 'https'. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def ssl_options; end @@ -2982,7 +2848,7 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:78 def ssl_options=(_arg0); end - # Returns the value of attribute timeout. + # Sets the number of seconds after which HTTP requests to the remote service should time out. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def timeout; end @@ -2992,7 +2858,7 @@ class ActiveResource::Connection # pkg:gem/activeresource#lib/active_resource/connection.rb:69 def timeout=(_arg0); end - # Returns the value of attribute user. + # Sets the user for remote service. # # pkg:gem/activeresource#lib/active_resource/connection.rb:22 def user; end @@ -3084,13 +2950,9 @@ ActiveResource::Connection::HTTP_FORMAT_HEADER_NAMES = T.let(T.unsafe(nil), Hash # pkg:gem/activeresource#lib/active_resource/exceptions.rb:4 class ActiveResource::ConnectionError < ::StandardError - # @return [ConnectionError] a new instance of ConnectionError - # # pkg:gem/activeresource#lib/active_resource/exceptions.rb:7 def initialize(response, message = T.unsafe(nil)); end - # Returns the value of attribute response. - # # pkg:gem/activeresource#lib/active_resource/exceptions.rb:5 def response; end @@ -3303,8 +3165,6 @@ end # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:54 class ActiveResource::HttpMock - # @return [HttpMock] a new instance of HttpMock - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:270 def initialize(site); end @@ -3344,15 +3204,11 @@ class ActiveResource::HttpMock # pkg:gem/activeresource#lib/active_resource/http_mock.rb:220 def enable_net_connection!; end - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:238 def net_connection_disabled?; end # Checks if real requests can be used instead of the default mock used in tests. # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:230 def net_connection_enabled?; end @@ -3477,8 +3333,6 @@ end # pkg:gem/activeresource#lib/active_resource/http_mock.rb:55 class ActiveResource::HttpMock::Responder - # @return [Responder] a new instance of Responder - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:56 def initialize(responses); end @@ -3508,8 +3362,6 @@ end # pkg:gem/activeresource#lib/active_resource/inheriting_hash.rb:4 class ActiveResource::InheritingHash < ::Hash - # @return [InheritingHash] a new instance of InheritingHash - # # pkg:gem/activeresource#lib/active_resource/inheriting_hash.rb:5 def initialize(parent_hash = T.unsafe(nil)); end @@ -3607,8 +3459,6 @@ end # pkg:gem/activeresource#lib/active_resource/reflection.rb:29 class ActiveResource::Reflection::AssociationReflection - # @return [AssociationReflection] a new instance of AssociationReflection - # # pkg:gem/activeresource#lib/active_resource/reflection.rb:30 def initialize(macro, name, options); end @@ -3669,59 +3519,33 @@ end # pkg:gem/activeresource#lib/active_resource/http_mock.rb:279 class ActiveResource::Request - # @return [Request] a new instance of Request - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:282 def initialize(method, path, body = T.unsafe(nil), headers = T.unsafe(nil), options = T.unsafe(nil)); end # pkg:gem/activeresource#lib/active_resource/http_mock.rb:286 def ==(req); end - # Returns the value of attribute body. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def body; end - # Sets the attribute body - # - # @param value the value to set the attribute body to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def body=(_arg0); end - # Returns the value of attribute headers. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def headers; end - # Sets the attribute headers - # - # @param value the value to set the attribute headers to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def headers=(_arg0); end - # Returns the value of attribute method. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def method; end - # Sets the attribute method - # - # @param value the value to set the attribute method to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def method=(_arg0); end - # Returns the value of attribute path. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def path; end - # Sets the attribute path - # - # @param value the value to set the attribute path to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:280 def path=(_arg0); end @@ -3737,13 +3561,9 @@ class ActiveResource::Request private - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:310 def headers_match?(req); end - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:302 def same_path?(req); end end @@ -3801,8 +3621,6 @@ class ActiveResource::ResourceNotFound < ::ActiveResource::ClientError; end # pkg:gem/activeresource#lib/active_resource/http_mock.rb:321 class ActiveResource::Response - # @return [Response] a new instance of Response - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:324 def initialize(body, message = T.unsafe(nil), headers = T.unsafe(nil)); end @@ -3818,59 +3636,33 @@ class ActiveResource::Response # pkg:gem/activeresource#lib/active_resource/http_mock.rb:346 def []=(key, value); end - # Returns the value of attribute body. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def body; end - # Sets the attribute body - # - # @param value the value to set the attribute body to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def body=(_arg0); end - # Returns the value of attribute code. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def code; end - # Sets the attribute code - # - # @param value the value to set the attribute code to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def code=(_arg0); end - # Returns the value of attribute headers. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def headers; end - # Sets the attribute headers - # - # @param value the value to set the attribute headers to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def headers=(_arg0); end - # Returns the value of attribute message. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def message; end - # Sets the attribute message - # - # @param value the value to set the attribute message to. - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:322 def message=(_arg0); end # Returns true if code is 2xx, # false otherwise. # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/http_mock.rb:338 def success?; end end @@ -3879,8 +3671,6 @@ end # # pkg:gem/activeresource#lib/active_resource/exceptions.rb:31 class ActiveResource::SSLError < ::ActiveResource::ConnectionError - # @return [SSLError] a new instance of SSLError - # # pkg:gem/activeresource#lib/active_resource/exceptions.rb:32 def initialize(message); end @@ -3903,13 +3693,9 @@ class ActiveResource::Schema # read out by the schema method to populate the schema of the actual # resource. # - # @return [Schema] a new instance of Schema - # # pkg:gem/activeresource#lib/active_resource/schema.rb:25 def initialize; end - # @raise [ArgumentError] - # # pkg:gem/activeresource#lib/active_resource/schema.rb:29 def attribute(name, type, options = T.unsafe(nil)); end @@ -4123,10 +3909,6 @@ module ActiveResource::Singleton::ClassMethods # pkg:gem/activeresource#lib/active_resource/singleton.rb:10 def singleton_name; end - # Sets the attribute singleton_name - # - # @param value the value to set the attribute singleton_name to. - # # pkg:gem/activeresource#lib/active_resource/singleton.rb:8 def singleton_name=(_arg0); end @@ -4169,8 +3951,6 @@ end # # pkg:gem/activeresource#lib/active_resource/exceptions.rb:23 class ActiveResource::TimeoutError < ::ActiveResource::ConnectionError - # @return [TimeoutError] a new instance of TimeoutError - # # pkg:gem/activeresource#lib/active_resource/exceptions.rb:24 def initialize(message); end @@ -4274,8 +4054,6 @@ module ActiveResource::Validations # my_person.valid? # # => false # - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/validations.rb:163 def valid?(context = T.unsafe(nil)); end @@ -4296,8 +4074,6 @@ end # pkg:gem/activeresource#lib/active_resource/where_clause.rb:4 class ActiveResource::WhereClause < ::BasicObject - # @return [WhereClause] a new instance of WhereClause - # # pkg:gem/activeresource#lib/active_resource/where_clause.rb:7 def initialize(resource_class, options = T.unsafe(nil)); end @@ -4346,19 +4122,13 @@ module ThreadsafeAttributes # pkg:gem/activeresource#lib/active_resource/threadsafe_attributes.rb:57 def set_threadsafe_attribute_by_thread(name, value, thread); end - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/threadsafe_attributes.rb:49 def threadsafe_attribute_defined?(name, main_thread); end - # @return [Boolean] - # # pkg:gem/activeresource#lib/active_resource/threadsafe_attributes.rb:62 def threadsafe_attribute_defined_by_thread?(name, thread); end class << self - # @private - # # pkg:gem/activeresource#lib/active_resource/threadsafe_attributes.rb:6 def included(klass); end end diff --git a/sorbet/rbi/gems/activestorage@8.1.2.rbi b/sorbet/rbi/gems/activestorage@8.1.2.rbi index 8715bca30..7bda55bbb 100644 --- a/sorbet/rbi/gems/activestorage@8.1.2.rbi +++ b/sorbet/rbi/gems/activestorage@8.1.2.rbi @@ -347,20 +347,14 @@ end # # pkg:gem/activestorage#lib/active_storage/analyzer.rb:8 class ActiveStorage::Analyzer - # @return [Analyzer] a new instance of Analyzer - # # pkg:gem/activestorage#lib/active_storage/analyzer.rb:23 def initialize(blob); end - # Returns the value of attribute blob. - # # pkg:gem/activestorage#lib/active_storage/analyzer.rb:9 def blob; end # Override this method in a concrete subclass. Have it return a Hash of metadata. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/analyzer.rb:28 def metadata; end @@ -384,21 +378,28 @@ class ActiveStorage::Analyzer # Implement this method in a concrete subclass. Have it return true when given a blob from which # the analyzer can extract metadata. # - # @return [Boolean] - # # pkg:gem/activestorage#lib/active_storage/analyzer.rb:13 def accept?(blob); end # Implement this method in concrete subclasses. It will determine if blob analysis # should be done in a job or performed inline. By default, analysis is enqueued in a job. # - # @return [Boolean] - # # pkg:gem/activestorage#lib/active_storage/analyzer.rb:19 def analyze_later?; end end end +# = Active Storage Audio \Analyzer +# +# Extracts duration (seconds), bit_rate (bits/s), sample_rate (hertz) and tags (internal metadata) from an audio blob. +# +# Example: +# +# ActiveStorage::Analyzer::AudioAnalyzer.new(blob).metadata +# # => { duration: 5.0, bit_rate: 320340, sample_rate: 44100, tags: { encoder: "Lavc57.64", ... } } +# +# This analyzer requires the {FFmpeg}[https://www.ffmpeg.org] system library, which is not provided by \Rails. +# # pkg:gem/activestorage#lib/active_storage/analyzer/audio_analyzer.rb:14 class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer # pkg:gem/activestorage#lib/active_storage/analyzer/audio_analyzer.rb:19 @@ -439,6 +440,17 @@ class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer end end +# = Active Storage Image \Analyzer +# +# This is an abstract base class for image analyzers, which extract width and height from an image blob. +# +# If the image contains EXIF data indicating its angle is 90 or 270 degrees, its width and height are swapped for convenience. +# +# Example: +# +# ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick.new(blob).metadata +# # => { width: 4104, height: 2736 } +# # pkg:gem/activestorage#lib/active_storage/analyzer/image_analyzer.rb:14 class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer extend ::ActiveSupport::Autoload @@ -452,6 +464,9 @@ class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer end end +# This analyzer relies on the third-party {MiniMagick}[https://github.com/minimagick/minimagick] gem. MiniMagick requires +# the {ImageMagick}[http://www.imagemagick.org] system library. +# # pkg:gem/activestorage#lib/active_storage/analyzer/image_analyzer/image_magick.rb:15 class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Analyzer::ImageAnalyzer private @@ -468,6 +483,9 @@ class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Ana end end +# This analyzer relies on the third-party {ruby-vips}[https://github.com/libvips/ruby-vips] gem. Ruby-vips requires +# the {libvips}[https://libvips.github.io/libvips/] system library. +# # pkg:gem/activestorage#lib/active_storage/analyzer/image_analyzer/vips.rb:23 class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer::ImageAnalyzer private @@ -501,6 +519,27 @@ class ActiveStorage::Analyzer::NullAnalyzer < ::ActiveStorage::Analyzer end end +# = Active Storage Video \Analyzer +# +# Extracts the following from a video blob: +# +# * Width (pixels) +# * Height (pixels) +# * Duration (seconds) +# * Angle (degrees) +# * Display aspect ratio +# * Audio (true if file has an audio channel, false if not) +# * Video (true if file has an video channel, false if not) +# +# Example: +# +# ActiveStorage::Analyzer::VideoAnalyzer.new(blob).metadata +# # => { width: 640.0, height: 480.0, duration: 5.0, angle: 0, display_aspect_ratio: [4, 3], audio: true, video: true } +# +# When a video's angle is 90, -90, 270 or -270 degrees, its width and height are automatically swapped for convenience. +# +# This analyzer requires the {FFmpeg}[https://www.ffmpeg.org] system library, which is not provided by \Rails. +# # pkg:gem/activestorage#lib/active_storage/analyzer/video_analyzer.rb:24 class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer # pkg:gem/activestorage#lib/active_storage/analyzer/video_analyzer.rb:29 @@ -587,18 +626,12 @@ end # # pkg:gem/activestorage#lib/active_storage/attached.rb:9 class ActiveStorage::Attached - # @return [Attached] a new instance of Attached - # # pkg:gem/activestorage#lib/active_storage/attached.rb:12 def initialize(name, record); end - # Returns the value of attribute name. - # # pkg:gem/activestorage#lib/active_storage/attached.rb:10 def name; end - # Returns the value of attribute record. - # # pkg:gem/activestorage#lib/active_storage/attached.rb:10 def record; end @@ -850,17 +883,46 @@ class ActiveStorage::Attached::Changes::PurgeOne def reset; end end +# = Active Storage \Attached \Many +# +# Decorated proxy object representing of multiple attachments to a model. +# # pkg:gem/activestorage#lib/active_storage/attached/many.rb:7 class ActiveStorage::Attached::Many < ::ActiveStorage::Attached + # Attaches one or more +attachables+ to the record. + # + # If the record is persisted and unchanged, the attachments are saved to + # the database immediately. Otherwise, they'll be saved to the DB when the + # record is next saved. + # + # document.images.attach(params[:images]) # Array of ActionDispatch::Http::UploadedFile objects + # document.images.attach(params[:signed_blob_id]) # Signed reference to blob from direct upload + # document.images.attach(io: File.open("/path/to/racecar.jpg"), filename: "racecar.jpg", content_type: "image/jpeg") + # document.images.attach([ first_blob, second_blob ]) + # # pkg:gem/activestorage#lib/active_storage/attached/many.rb:51 def attach(*attachables); end + # Returns true if any attachments have been made. + # + # class Gallery < ApplicationRecord + # has_many_attached :photos + # end + # + # Gallery.new.photos.attached? # => false + # # pkg:gem/activestorage#lib/active_storage/attached/many.rb:66 def attached?; end + # Returns all the associated attachment records. + # + # All methods called on this proxy object that aren't listed here will automatically be delegated to +attachments+. + # # pkg:gem/activestorage#lib/active_storage/attached/many.rb:32 def attachments; end + # Returns all attached blobs. + # # pkg:gem/activestorage#lib/active_storage/attached/many.rb:37 def blobs; end @@ -888,6 +950,10 @@ class ActiveStorage::Attached::Many < ::ActiveStorage::Attached def respond_to_missing?(name, include_private = T.unsafe(nil)); end end +# = Active Storage \Attached \Model +# +# Provides the class-level DSL for declaring an Active Record model's attachments. +# # pkg:gem/activestorage#lib/active_storage/attached/model.rb:9 module ActiveStorage::Attached::Model extend ::ActiveSupport::Concern @@ -928,17 +994,53 @@ module ActiveStorage::Attached::Model::ClassMethods def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end end +# = Active Storage \Attached \One +# +# Representation of a single attachment to a model. +# # pkg:gem/activestorage#lib/active_storage/attached/one.rb:7 class ActiveStorage::Attached::One < ::ActiveStorage::Attached + # Attaches an +attachable+ to the record. + # + # If the record is persisted and unchanged, the attachment is saved to + # the database immediately. Otherwise, it'll be saved to the DB when the + # record is next saved. + # + # person.avatar.attach(params[:avatar]) # ActionDispatch::Http::UploadedFile object + # person.avatar.attach(params[:signed_blob_id]) # Signed reference to blob from direct upload + # person.avatar.attach(io: File.open("/path/to/face.jpg"), filename: "face.jpg", content_type: "image/jpeg") + # person.avatar.attach(avatar_blob) # ActiveStorage::Blob object + # # pkg:gem/activestorage#lib/active_storage/attached/one.rb:58 def attach(attachable); end + # Returns +true+ if an attachment has been made. + # + # class User < ApplicationRecord + # has_one_attached :avatar + # end + # + # User.new.avatar.attached? # => false + # # pkg:gem/activestorage#lib/active_storage/attached/one.rb:73 def attached?; end + # Returns the associated attachment record. + # + # You don't have to call this method to access the attachment's methods as + # they are all available at the model level. + # # pkg:gem/activestorage#lib/active_storage/attached/one.rb:33 def attachment; end + # Returns +true+ if an attachment is not attached. + # + # class User < ApplicationRecord + # has_one_attached :avatar + # end + # + # User.new.avatar.blank? # => true + # # pkg:gem/activestorage#lib/active_storage/attached/one.rb:44 def blank?; end @@ -1173,16 +1275,12 @@ end # pkg:gem/activestorage#lib/active_storage/downloader.rb:4 class ActiveStorage::Downloader - # @return [Downloader] a new instance of Downloader - # # pkg:gem/activestorage#lib/active_storage/downloader.rb:7 def initialize(service); end # pkg:gem/activestorage#lib/active_storage/downloader.rb:11 def open(key, checksum: T.unsafe(nil), verify: T.unsafe(nil), name: T.unsafe(nil), tmpdir: T.unsafe(nil)); end - # Returns the value of attribute service. - # # pkg:gem/activestorage#lib/active_storage/downloader.rb:5 def service; end @@ -1451,13 +1549,9 @@ end # # pkg:gem/activestorage#lib/active_storage/previewer.rb:9 class ActiveStorage::Previewer - # @return [Previewer] a new instance of Previewer - # # pkg:gem/activestorage#lib/active_storage/previewer.rb:18 def initialize(blob); end - # Returns the value of attribute blob. - # # pkg:gem/activestorage#lib/active_storage/previewer.rb:10 def blob; end @@ -1465,8 +1559,6 @@ class ActiveStorage::Previewer # anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to # the underlying blob that is created. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/previewer.rb:25 def preview(**options); end @@ -1517,8 +1609,6 @@ class ActiveStorage::Previewer # Implement this method in a concrete subclass. Have it return true when given a blob from which # the previewer can generate an image. # - # @return [Boolean] - # # pkg:gem/activestorage#lib/active_storage/previewer.rb:14 def accept?(blob); end end @@ -1814,44 +1904,31 @@ class ActiveStorage::Service # Concatenate multiple files into a single "composed" file. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:96 def compose(source_keys, destination_key, filename: T.unsafe(nil), content_type: T.unsafe(nil), disposition: T.unsafe(nil), custom_metadata: T.unsafe(nil)); end # Delete the file at the +key+. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:101 def delete(key); end # Delete files at keys starting with the +prefix+. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:106 def delete_prefixed(prefix); end # Return the content of the file at the +key+. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:82 def download(key); end # Return the partial content in the byte +range+ of the file at the +key+. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:87 def download_chunk(key, range); end # Return +true+ if a file exists at the +key+. # - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/activestorage#lib/active_storage/service.rb:111 def exist?(key); end @@ -1863,23 +1940,15 @@ class ActiveStorage::Service # pkg:gem/activestorage#lib/active_storage/service.rb:151 def inspect; end - # Returns the value of attribute name. - # # pkg:gem/activestorage#lib/active_storage/service.rb:46 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activestorage#lib/active_storage/service.rb:46 def name=(_arg0); end # pkg:gem/activestorage#lib/active_storage/service.rb:91 def open(*args, **options, &block); end - # @return [Boolean] - # # pkg:gem/activestorage#lib/active_storage/service.rb:147 def public?; end @@ -1893,8 +1962,6 @@ class ActiveStorage::Service # Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will # ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:71 def upload(key, io, checksum: T.unsafe(nil), **options); end @@ -1911,8 +1978,6 @@ class ActiveStorage::Service # You must also provide the +content_type+, +content_length+, and +checksum+ of the file # that will be uploaded. All these attributes will be validated by the service upon upload. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:138 def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end @@ -1921,21 +1986,15 @@ class ActiveStorage::Service # pkg:gem/activestorage#lib/active_storage/service.rb:179 def content_disposition_with(filename:, type: T.unsafe(nil)); end - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:164 def custom_metadata_headers(metadata); end # pkg:gem/activestorage#lib/active_storage/service.rb:168 def instrument(operation, payload = T.unsafe(nil), &block); end - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:156 def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/service.rb:160 def public_url(key, **_arg1); end @@ -2120,8 +2179,6 @@ end # # pkg:gem/activestorage#lib/active_storage/transformers/transformer.rb:13 class ActiveStorage::Transformers::Transformer - # @return [Transformer] a new instance of Transformer - # # pkg:gem/activestorage#lib/active_storage/transformers/transformer.rb:16 def initialize(transformations); end @@ -2132,8 +2189,6 @@ class ActiveStorage::Transformers::Transformer # pkg:gem/activestorage#lib/active_storage/transformers/transformer.rb:23 def transform(file, format:); end - # Returns the value of attribute transformations. - # # pkg:gem/activestorage#lib/active_storage/transformers/transformer.rb:14 def transformations; end @@ -2142,8 +2197,6 @@ class ActiveStorage::Transformers::Transformer # Returns an open Tempfile containing a transformed image in the given +format+. # All subclasses implement this method. # - # @raise [NotImplementedError] - # # pkg:gem/activestorage#lib/active_storage/transformers/transformer.rb:36 def process(file, format:); end end diff --git a/sorbet/rbi/gems/activesupport@8.1.2.rbi b/sorbet/rbi/gems/activesupport@8.1.2.rbi index eadf8fc55..997f896fc 100644 --- a/sorbet/rbi/gems/activesupport@8.1.2.rbi +++ b/sorbet/rbi/gems/activesupport@8.1.2.rbi @@ -6,6 +6,28 @@ # :include: ../README.rdoc +# -- +# The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting +# their default behavior. That said, we need to define the basic to_json method in all of them, +# otherwise they will always use to_json gem implementation, which is backwards incompatible in +# several cases (for instance, the JSON implementation for Hash does not work) with inheritance. +# +# On the other hand, we should avoid conflict with ::JSON.{generate,dump}(obj). Unfortunately, the +# JSON gem's encoder relies on its own to_json implementation to encode objects. Since it always +# passes a ::JSON::State object as the only argument to to_json, we can detect that and forward the +# calls to the original to_json method. +# +# It should be noted that when using ::JSON.{generate,dump} directly, ActiveSupport's encoder is +# bypassed completely. This means that as_json won't be invoked and the JSON gem will simply +# ignore any options it does not natively understand. This also means that ::JSON.{generate,dump} +# should give exactly the same results with or without Active Support. +# :markup: markdown +# -- +# Defines the standard inflection rules. These are the starting point for +# new projects and are not considered complete. The current set of inflection +# rules is frozen. This means, we do not change them to become more complete. +# This is a safety measure to keep existing applications from breaking. +# ++ # # pkg:gem/activesupport#lib/active_support/delegation.rb:3 module ActiveSupport @@ -233,8 +255,6 @@ class ActiveSupport::ArrayInquirer < ::Array # variants.any?('phone', 'desktop') # => true # variants.any?(:desktop, :watch) # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/array_inquirer.rb:27 def any?(*candidates); end @@ -243,8 +263,6 @@ class ActiveSupport::ArrayInquirer < ::Array # pkg:gem/activesupport#lib/active_support/array_inquirer.rb:42 def method_missing(name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/array_inquirer.rb:38 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -324,8 +342,6 @@ end # # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:34 class ActiveSupport::BacktraceCleaner - # @return [BacktraceCleaner] a new instance of BacktraceCleaner - # # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:35 def initialize; end @@ -372,26 +388,31 @@ class ActiveSupport::BacktraceCleaner # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:67 def clean_locations(locations, kind = T.unsafe(nil)); end - # Returns the backtrace after all filters and silencers have been run - # against it. Filters run first, then silencers. - # # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:57 def filter(backtrace, kind = T.unsafe(nil)); end + # Returns the first clean frame of the caller's backtrace, or +nil+. + # + # Frames are strings. # Returns the first clean frame of the caller's backtrace, or +nil+. # # Frames are strings. # - # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:129 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:94 def first_clean_frame(kind = T.unsafe(nil)); end + # Returns the first clean location of the caller's call stack, or +nil+. + # + # Locations are Thread::Backtrace::Location objects. Since they are + # immutable, their +path+ attributes are the original ones, but filters + # are applied internally so silencers can still rely on them. # Returns the first clean location of the caller's call stack, or +nil+. # # Locations are Thread::Backtrace::Location objects. Since they are # immutable, their +path+ attributes are the original ones, but filters # are applied internally so silencers can still rely on them. # - # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:141 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:113 def first_clean_location(kind = T.unsafe(nil)); end # Removes all filters, but leaves in the silencers. Useful if you suddenly @@ -577,8 +598,6 @@ class ActiveSupport::BroadcastLogger include ::ActiveSupport::LoggerSilence include ::ActiveSupport::LoggerThreadSafeLevel - # @return [BroadcastLogger] a new instance of BroadcastLogger - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:81 def initialize(*loggers); end @@ -615,8 +634,6 @@ class ActiveSupport::BroadcastLogger # True if the log level allows entries with severity +Logger::DEBUG+ to be written # to at least one broadcast. False otherwise. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:141 def debug?; end @@ -631,8 +648,6 @@ class ActiveSupport::BroadcastLogger # True if the log level allows entries with severity +Logger::ERROR+ to be written # to at least one broadcast. False otherwise. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:174 def error?; end @@ -647,8 +662,6 @@ class ActiveSupport::BroadcastLogger # True if the log level allows entries with severity +Logger::FATAL+ to be written # to at least one broadcast. False otherwise. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:185 def fatal?; end @@ -669,8 +682,6 @@ class ActiveSupport::BroadcastLogger # True if the log level allows entries with severity +Logger::INFO+ to be written # to at least one broadcast. False otherwise. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:152 def info?; end @@ -679,6 +690,8 @@ class ActiveSupport::BroadcastLogger # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:135 def level; end + # Returns the lowest level of all the loggers in the broadcast. + # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 def level=(*_arg0, **_arg1, &_arg2); end @@ -691,15 +704,9 @@ class ActiveSupport::BroadcastLogger # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 def log(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute progname. - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:79 def progname; end - # Sets the attribute progname - # - # @param value the value to set the attribute progname to. - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:79 def progname=(_arg0); end @@ -737,8 +744,6 @@ class ActiveSupport::BroadcastLogger # True if the log level allows entries with severity +Logger::WARN+ to be written # to at least one broadcast. False otherwise. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:163 def warn?; end @@ -753,8 +758,6 @@ class ActiveSupport::BroadcastLogger # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:222 def method_missing(name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:234 def respond_to_missing?(method, include_all); end @@ -791,15 +794,9 @@ module ActiveSupport::Cache # pkg:gem/activesupport#lib/active_support/cache.rb:113 def expand_cache_key(key, namespace = T.unsafe(nil)); end - # Returns the value of attribute format_version. - # # pkg:gem/activesupport#lib/active_support/cache.rb:60 def format_version; end - # Sets the attribute format_version - # - # @param value the value to set the attribute format_version to. - # # pkg:gem/activesupport#lib/active_support/cache.rb:60 def format_version=(_arg0); end @@ -847,8 +844,6 @@ end # pkg:gem/activesupport#lib/active_support/cache/coder.rb:7 class ActiveSupport::Cache::Coder - # @return [Coder] a new instance of Coder - # # pkg:gem/activesupport#lib/active_support/cache/coder.rb:8 def initialize(serializer, compressor, legacy_serializer: T.unsafe(nil)); end @@ -869,8 +864,6 @@ class ActiveSupport::Cache::Coder # pkg:gem/activesupport#lib/active_support/cache/coder.rb:144 def load_version(dumped_version); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/coder.rb:121 def signature?(dumped); end @@ -886,13 +879,9 @@ ActiveSupport::Cache::Coder::COMPRESSED_FLAG = T.let(T.unsafe(nil), Integer) # pkg:gem/activesupport#lib/active_support/cache/coder.rb:98 class ActiveSupport::Cache::Coder::LazyEntry < ::ActiveSupport::Cache::Entry - # @return [LazyEntry] a new instance of LazyEntry - # # pkg:gem/activesupport#lib/active_support/cache/coder.rb:99 def initialize(serializer, compressor, payload, **options); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/coder.rb:114 def mismatched?(version); end @@ -932,8 +921,6 @@ ActiveSupport::Cache::Coder::STRING_ENCODINGS = T.let(T.unsafe(nil), Hash) # pkg:gem/activesupport#lib/active_support/cache/coder.rb:86 class ActiveSupport::Cache::Coder::StringDeserializer - # @return [StringDeserializer] a new instance of StringDeserializer - # # pkg:gem/activesupport#lib/active_support/cache/coder.rb:87 def initialize(encoding); end @@ -963,8 +950,6 @@ class ActiveSupport::Cache::Entry # Creates a new cache entry for the specified value. Options supported are # +:compressed+, +:version+, +:expires_at+ and +:expires_in+. # - # @return [Entry] a new instance of Entry - # # pkg:gem/activesupport#lib/active_support/cache/entry.rb:25 def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end @@ -977,8 +962,6 @@ class ActiveSupport::Cache::Entry # pkg:gem/activesupport#lib/active_support/cache/entry.rb:76 def compressed(compress_threshold); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/entry.rb:72 def compressed?; end @@ -991,8 +974,6 @@ class ActiveSupport::Cache::Entry # Checks if the entry is expired. The +expires_in+ parameter can override # the value set when the entry was created. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/entry.rb:43 def expired?; end @@ -1002,13 +983,9 @@ class ActiveSupport::Cache::Entry # pkg:gem/activesupport#lib/active_support/cache/entry.rb:51 def expires_at=(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/entry.rb:100 def local?; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/entry.rb:37 def mismatched?(version); end @@ -1018,8 +995,6 @@ class ActiveSupport::Cache::Entry # pkg:gem/activesupport#lib/active_support/cache/entry.rb:33 def value; end - # Returns the value of attribute version. - # # pkg:gem/activesupport#lib/active_support/cache/entry.rb:21 def version; end @@ -1043,13 +1018,9 @@ end # # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:12 class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store - # @return [FileStore] a new instance of FileStore - # # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:20 def initialize(cache_path, **options); end - # Returns the value of attribute cache_path. - # # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:13 def cache_path; end @@ -1154,8 +1125,6 @@ class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store class << self # Advertise cache versioning support. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:26 def supports_cache_versioning?; end end @@ -1164,19 +1133,186 @@ end # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:15 ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) -# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) -# # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:16 ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) -# max is 1024, plus some room +# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) # # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:17 ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) +# max is 1024, plus some room +# # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:18 ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) +# = Memcached \Cache \Store +# +# A cache store implementation which stores data in Memcached: +# https://memcached.org +# +# This is currently the most popular cache store for production websites. +# +# Special features: +# - Clustering and load balancing. One can specify multiple memcached servers, +# and +MemCacheStore+ will load balance between all available servers. If a +# server goes down, then +MemCacheStore+ will ignore it until it comes back up. +# +# +MemCacheStore+ implements the Strategy::LocalCache strategy which +# implements an in-memory cache inside of a block. +# +# pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:32 +class ActiveSupport::Cache::MemCacheStore < ::ActiveSupport::Cache::Store + include ::ActiveSupport::Cache::Strategy::LocalCache + + # Creates a new +MemCacheStore+ object, with the given memcached server + # addresses. Each address is either a host name, or a host-with-port string + # in the form of "host_name:port". For example: + # + # ActiveSupport::Cache::MemCacheStore.new("localhost", "server-downstairs.localnetwork:8229") + # + # If no addresses are provided, but ENV['MEMCACHE_SERVERS'] is defined, it will be used instead. Otherwise, + # +MemCacheStore+ will connect to localhost:11211 (the default memcached port). + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:76 + def initialize(*addresses); end + + # Clear the entire cache on all memcached servers. This method should + # be used with care when shared cache is being used. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:178 + def clear(options = T.unsafe(nil)); end + + # Decrement a cached integer value using the memcached decr atomic operator. + # Returns the updated value. + # + # If the key is unset or has expired, it will be set to 0. Memcached + # does not support negative counters. + # + # cache.decrement("foo") # => 0 + # + # To set a specific value, call #write passing raw: true: + # + # cache.write("baz", 5, raw: true) + # cache.decrement("baz") # => 4 + # + # Decrementing a non-numeric value, or a value written without + # raw: true, will fail and return +nil+. + # + # To read the value later, call #read_counter: + # + # cache.decrement("baz") # => 3 + # cache.read_counter("baz") # 3 + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:165 + def decrement(name, amount = T.unsafe(nil), **options); end + + # Increment a cached integer value using the memcached incr atomic operator. + # Returns the updated value. + # + # If the key is unset or has expired, it will be set to +amount+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write passing raw: true: + # + # cache.write("baz", 5, raw: true) + # cache.increment("baz") # => 6 + # + # Incrementing a non-numeric value, or a value written without + # raw: true, will fail and return +nil+. + # + # To read the value later, call #read_counter: + # + # cache.increment("baz") # => 7 + # cache.read_counter("baz") # 7 + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:134 + def increment(name, amount = T.unsafe(nil), **options); end + + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:96 + def inspect; end + + # Get the statistics from the memcached servers. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:183 + def stats; end + + private + + # Delete an entry from the cache. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:243 + def delete_entry(key, **_arg1); end + + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:267 + def deserialize_entry(payload, raw: T.unsafe(nil), **_arg2); end + + # Memcache keys are binaries. So we need to force their encoding to binary + # before applying the regular expression to ensure we are escaping all + # characters properly. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:258 + def normalize_key(key, options); end + + # Read an entry from the cache. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:189 + def read_entry(key, **options); end + + # Reads multiple entries from the cache implementation. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:219 + def read_multi_entries(names, **options); end + + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:193 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:275 + def rescue_error_with(fallback); end + + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:247 + def serialize_entry(entry, raw: T.unsafe(nil), **options); end + + # Write an entry to the cache. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:200 + def write_entry(key, entry, **options); end + + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:204 + def write_serialized_entry(key, payload, **_arg2); end + + class << self + # Creates a new Dalli::Client instance with specified addresses and options. + # If no addresses are provided, we give nil to Dalli::Client, so it uses its fallbacks: + # - ENV["MEMCACHE_SERVERS"] (if defined) + # - "127.0.0.1:11211" (otherwise) + # + # ActiveSupport::Cache::MemCacheStore.build_mem_cache + # # => # + # ActiveSupport::Cache::MemCacheStore.build_mem_cache('localhost:10290') + # # => # + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:55 + def build_mem_cache(*addresses); end + + # Advertise cache versioning support. + # + # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:38 + def supports_cache_versioning?; end + end +end + +# pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:44 +ActiveSupport::Cache::MemCacheStore::ESCAPE_KEY_CHARS = T.let(T.unsafe(nil), Regexp) + +# These options represent behavior overridden by this implementation and should +# not be allowed to get down to the Dalli client +# +# pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:35 +ActiveSupport::Cache::MemCacheStore::OVERRIDDEN_OPTIONS = T.let(T.unsafe(nil), Array) + # = Memory \Cache \Store # # A cache store implementation which stores everything into memory in the @@ -1203,8 +1339,6 @@ ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store include ::ActiveSupport::Cache::Strategy::LocalCache - # @return [MemoryStore] a new instance of MemoryStore - # # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:75 def initialize(options = T.unsafe(nil)); end @@ -1263,8 +1397,6 @@ class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store # Returns true if the cache is currently being pruned. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:135 def pruning?; end @@ -1297,8 +1429,6 @@ class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store class << self # Advertise cache versioning support. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:90 def supports_cache_versioning?; end end @@ -1384,8 +1514,6 @@ class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store class << self # Advertise cache versioning support. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:18 def supports_cache_versioning?; end end @@ -1466,8 +1594,6 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # cache.exist?('foo') # => true # cache.exist?('bar') # => false # - # @return [RedisCacheStore] a new instance of RedisCacheStore - # # pkg:gem/activesupport#lib/active_support/cache/redis_cache_store.rb:155 def initialize(error_handler: T.unsafe(nil), **redis_options); end @@ -1568,8 +1694,6 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # pkg:gem/activesupport#lib/active_support/cache/redis_cache_store.rb:181 def read_multi(*names); end - # Returns the value of attribute redis. - # # pkg:gem/activesupport#lib/active_support/cache/redis_cache_store.rb:106 def redis; end @@ -1620,8 +1744,6 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # pkg:gem/activesupport#lib/active_support/cache/redis_cache_store.rb:442 def serialize_entry(entry, raw: T.unsafe(nil), **options); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/redis_cache_store.rb:483 def supports_expire_nx?; end @@ -1657,8 +1779,6 @@ class ActiveSupport::Cache::RedisCacheStore < ::ActiveSupport::Cache::Store # Advertise cache versioning support. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/redis_cache_store.rb:60 def supports_cache_versioning?; end @@ -1714,8 +1834,6 @@ module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:77 def dump_compressed(entry, threshold); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:94 def dumped?(dumped); end end @@ -1738,8 +1856,6 @@ module ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:105 def dump(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:113 def dumped?(dumped); end end @@ -1759,15 +1875,11 @@ module ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:122 def dump(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:130 def dumped?(dumped); end private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:135 def available?; end end @@ -1787,8 +1899,6 @@ module ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:53 def dump_compressed(entry, threshold); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:61 def dumped?(dumped); end end @@ -1912,8 +2022,6 @@ class ActiveSupport::Cache::Store # Any other specified options are treated as default options for the # relevant cache operations, such as #read, #write, and #fetch. # - # @return [Store] a new instance of Store - # # pkg:gem/activesupport#lib/active_support/cache.rb:300 def initialize(options = T.unsafe(nil)); end @@ -1923,8 +2031,6 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:785 def cleanup(options = T.unsafe(nil)); end @@ -1935,8 +2041,6 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:795 def clear(options = T.unsafe(nil)); end @@ -1946,8 +2050,6 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:750 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end @@ -1965,8 +2067,6 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:732 def delete_matched(matcher, options = T.unsafe(nil)); end @@ -1982,8 +2082,6 @@ class ActiveSupport::Cache::Store # # Options are passed to the underlying cache implementation. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/cache.rb:713 def exist?(name, options = T.unsafe(nil)); end @@ -2135,8 +2233,6 @@ class ActiveSupport::Cache::Store # cache.read("fizz") # # => nil # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:603 def fetch_multi(*names); end @@ -2146,8 +2242,6 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:741 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end @@ -2176,8 +2270,6 @@ class ActiveSupport::Cache::Store # pkg:gem/activesupport#lib/active_support/cache.rb:723 def new_entry(value, options = T.unsafe(nil)); end - # Returns the value of attribute options. - # # pkg:gem/activesupport#lib/active_support/cache.rb:200 def options; end @@ -2229,8 +2321,6 @@ class ActiveSupport::Cache::Store # pkg:gem/activesupport#lib/active_support/cache.rb:544 def read_multi(*names); end - # Returns the value of attribute silence. - # # pkg:gem/activesupport#lib/active_support/cache.rb:200 def silence; end @@ -2239,8 +2329,6 @@ class ActiveSupport::Cache::Store # pkg:gem/activesupport#lib/active_support/cache.rb:324 def silence!; end - # Returns the value of attribute silence. - # # pkg:gem/activesupport#lib/active_support/cache.rb:201 def silence?; end @@ -2314,8 +2402,6 @@ class ActiveSupport::Cache::Store # Deletes an entry from the cache implementation. Subclasses must # implement this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:897 def delete_entry(key, **options); end @@ -2328,8 +2414,6 @@ class ActiveSupport::Cache::Store # pkg:gem/activesupport#lib/active_support/cache.rb:862 def deserialize_entry(payload, **_arg1); end - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:984 def expand_and_namespace_key(key, options = T.unsafe(nil)); end @@ -2402,8 +2486,6 @@ class ActiveSupport::Cache::Store # Reads an entry from the cache implementation. Subclasses must implement # this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:843 def read_entry(key, **options); end @@ -2428,8 +2510,6 @@ class ActiveSupport::Cache::Store # Writes an entry to the cache implementation. Subclasses must implement # this method. # - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/cache.rb:849 def write_entry(key, entry, **options); end @@ -2571,8 +2651,6 @@ end # # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:35 class ActiveSupport::Cache::Strategy::LocalCache::LocalStore - # @return [LocalStore] a new instance of LocalStore - # # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:36 def initialize; end @@ -2601,20 +2679,12 @@ end # # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:13 class ActiveSupport::Cache::Strategy::LocalCache::Middleware - # @return [Middleware] a new instance of Middleware - # # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:17 def initialize(name, cache); end - # Returns the value of attribute cache. - # # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:15 def cache; end - # Sets the attribute cache - # - # @param value the value to set the attribute cache to. - # # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:15 def cache=(_arg0); end @@ -2641,8 +2711,6 @@ ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) # # pkg:gem/activesupport#lib/active_support/cache.rb:1132 class ActiveSupport::Cache::WriteOptions - # @return [WriteOptions] a new instance of WriteOptions - # # pkg:gem/activesupport#lib/active_support/cache.rb:1133 def initialize(options); end @@ -2681,8 +2749,6 @@ end # # pkg:gem/activesupport#lib/active_support/key_generator.rb:55 class ActiveSupport::CachingKeyGenerator - # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator - # # pkg:gem/activesupport#lib/active_support/key_generator.rb:56 def initialize(key_generator); end @@ -2825,8 +2891,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:396 class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 - # @return [InstanceExec0] a new instance of InstanceExec0 - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:397 def initialize(block); end @@ -2842,8 +2906,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:418 class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 - # @return [InstanceExec1] a new instance of InstanceExec1 - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:419 def initialize(block); end @@ -2859,13 +2921,9 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:440 class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 - # @return [InstanceExec2] a new instance of InstanceExec2 - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:441 def initialize(block); end - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:445 def expand(target, value, block); end @@ -2878,8 +2936,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:338 class ActiveSupport::Callbacks::CallTemplate::MethodCall - # @return [MethodCall] a new instance of MethodCall - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:339 def initialize(method); end @@ -2909,8 +2965,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:373 class ActiveSupport::Callbacks::CallTemplate::ObjectCall - # @return [ObjectCall] a new instance of ObjectCall - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:374 def initialize(target, method); end @@ -2926,8 +2980,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:465 class ActiveSupport::Callbacks::CallTemplate::ProcCall - # @return [ProcCall] a new instance of ProcCall - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:466 def initialize(target); end @@ -2943,8 +2995,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:231 class ActiveSupport::Callbacks::Callback - # @return [Callback] a new instance of Callback - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:246 def initialize(name, filter, kind, options, chain_config); end @@ -2953,8 +3003,6 @@ class ActiveSupport::Callbacks::Callback # pkg:gem/activesupport#lib/active_support/callbacks.rb:300 def apply(callback_sequence); end - # Returns the value of attribute chain_config. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:244 def chain_config; end @@ -2964,45 +3012,27 @@ class ActiveSupport::Callbacks::Callback # pkg:gem/activesupport#lib/active_support/callbacks.rb:304 def current_scopes; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:273 def duplicates?(other); end - # Returns the value of attribute filter. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:244 def filter; end - # Returns the value of attribute kind. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:243 def kind; end - # Sets the attribute kind - # - # @param value the value to set the attribute kind to. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:243 def kind=(_arg0); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:269 def matches?(_kind, _filter); end # pkg:gem/activesupport#lib/active_support/callbacks.rb:257 def merge_conditional_options(chain, if_option:, unless_option:); end - # Returns the value of attribute name. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:243 def name; end - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:243 def name=(_arg0); end @@ -3027,8 +3057,6 @@ ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) class ActiveSupport::Callbacks::CallbackChain include ::Enumerable - # @return [CallbackChain] a new instance of CallbackChain - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:573 def initialize(name, config); end @@ -3041,8 +3069,6 @@ class ActiveSupport::Callbacks::CallbackChain # pkg:gem/activesupport#lib/active_support/callbacks.rb:615 def compile(type); end - # Returns the value of attribute config. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:571 def config; end @@ -3052,8 +3078,6 @@ class ActiveSupport::Callbacks::CallbackChain # pkg:gem/activesupport#lib/active_support/callbacks.rb:585 def each(&block); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:587 def empty?; end @@ -3063,8 +3087,6 @@ class ActiveSupport::Callbacks::CallbackChain # pkg:gem/activesupport#lib/active_support/callbacks.rb:589 def insert(index, o); end - # Returns the value of attribute name. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:571 def name; end @@ -3073,8 +3095,6 @@ class ActiveSupport::Callbacks::CallbackChain protected - # Returns the value of attribute chain. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:642 def chain; end @@ -3108,8 +3128,6 @@ end # # pkg:gem/activesupport#lib/active_support/callbacks.rb:519 class ActiveSupport::Callbacks::CallbackSequence - # @return [CallbackSequence] a new instance of CallbackSequence - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:520 def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end @@ -3125,8 +3143,6 @@ class ActiveSupport::Callbacks::CallbackSequence # pkg:gem/activesupport#lib/active_support/callbacks.rb:555 def expand_call_template(arg, block); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:551 def final?; end @@ -3136,13 +3152,9 @@ class ActiveSupport::Callbacks::CallbackSequence # pkg:gem/activesupport#lib/active_support/callbacks.rb:559 def invoke_before(arg); end - # Returns the value of attribute nested. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:549 def nested; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:545 def skip?(arg); end end @@ -3346,8 +3358,6 @@ module ActiveSupport::Callbacks::Conditionals; end # pkg:gem/activesupport#lib/active_support/callbacks.rb:154 class ActiveSupport::Callbacks::Conditionals::Value - # @return [Value] a new instance of Value - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:155 def initialize(&block); end @@ -3360,8 +3370,6 @@ module ActiveSupport::Callbacks::Filters; end # pkg:gem/activesupport#lib/active_support/callbacks.rb:194 class ActiveSupport::Callbacks::Filters::After - # @return [After] a new instance of After - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:196 def initialize(user_callback, user_conditions, chain_config); end @@ -3371,26 +3379,18 @@ class ActiveSupport::Callbacks::Filters::After # pkg:gem/activesupport#lib/active_support/callbacks.rb:202 def call(env); end - # Returns the value of attribute halting. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:195 def halting; end - # Returns the value of attribute user_callback. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:195 def user_callback; end - # Returns the value of attribute user_conditions. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:195 def user_conditions; end end # pkg:gem/activesupport#lib/active_support/callbacks.rb:219 class ActiveSupport::Callbacks::Filters::Around - # @return [Around] a new instance of Around - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:220 def initialize(user_callback, user_conditions); end @@ -3400,8 +3400,6 @@ end # pkg:gem/activesupport#lib/active_support/callbacks.rb:165 class ActiveSupport::Callbacks::Filters::Before - # @return [Before] a new instance of Before - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:166 def initialize(user_callback, user_conditions, chain_config, filter, name); end @@ -3411,76 +3409,39 @@ class ActiveSupport::Callbacks::Filters::Before # pkg:gem/activesupport#lib/active_support/callbacks.rb:173 def call(env); end - # Returns the value of attribute filter. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 def filter; end - # Returns the value of attribute halted_lambda. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 def halted_lambda; end - # Returns the value of attribute name. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 def name; end - # Returns the value of attribute user_callback. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 def user_callback; end - # Returns the value of attribute user_conditions. - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 def user_conditions; end end # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 class ActiveSupport::Callbacks::Filters::Environment < ::Struct - # Returns the value of attribute halted - # - # @return [Object] the current value of halted - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def halted; end - # Sets the attribute halted - # - # @param value [Object] the value to set the attribute halted to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def halted=(_); end - # Returns the value of attribute target - # - # @return [Object] the current value of target - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def target; end - # Sets the attribute target - # - # @param value [Object] the value to set the attribute target to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def target=(_); end - # Returns the value of attribute value - # - # @return [Object] the current value of value - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def value; end - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def value=(_); end @@ -3515,13 +3476,9 @@ end # pkg:gem/activesupport#lib/active_support/code_generator.rb:4 class ActiveSupport::CodeGenerator - # @return [CodeGenerator] a new instance of CodeGenerator - # # pkg:gem/activesupport#lib/active_support/code_generator.rb:53 def initialize(owner, path, line); end - # @yield [@sources] - # # pkg:gem/activesupport#lib/active_support/code_generator.rb:61 def class_eval; end @@ -3539,8 +3496,6 @@ end # pkg:gem/activesupport#lib/active_support/code_generator.rb:5 class ActiveSupport::CodeGenerator::MethodSet - # @return [MethodSet] a new instance of MethodSet - # # pkg:gem/activesupport#lib/active_support/code_generator.rb:8 def initialize(namespace); end @@ -3583,8 +3538,6 @@ module ActiveSupport::CompareWithRange # # The given range must be fully bounded, with both start and end. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/range/compare_range.rb:41 def include?(value); end end @@ -3752,16 +3705,12 @@ end # pkg:gem/activesupport#lib/active_support/concern.rb:113 class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError - # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks - # # pkg:gem/activesupport#lib/active_support/concern.rb:114 def initialize; end end # pkg:gem/activesupport#lib/active_support/concern.rb:119 class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError - # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks - # # pkg:gem/activesupport#lib/active_support/concern.rb:120 def initialize; end end @@ -3791,8 +3740,6 @@ end class ActiveSupport::Concurrency::ShareLock include ::MonitorMixin - # @return [ShareLock] a new instance of ShareLock - # # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:49 def initialize; end @@ -3859,18 +3806,12 @@ class ActiveSupport::Concurrency::ShareLock # Must be called within synchronize # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:203 def busy_for_exclusive?(purpose); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:208 def busy_for_sharing?(purpose); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:213 def eligible_waiters?(compatible); end @@ -3880,8 +3821,6 @@ end # pkg:gem/activesupport#lib/active_support/concurrency/thread_monitor.rb:5 class ActiveSupport::Concurrency::ThreadMonitor - # @return [ThreadMonitor] a new instance of ThreadMonitor - # # pkg:gem/activesupport#lib/active_support/concurrency/thread_monitor.rb:10 def initialize; end @@ -3972,8 +3911,6 @@ module ActiveSupport::Configurable::ClassMethods # # User.allowed_access # => true # - # @yield [config] - # # pkg:gem/activesupport#lib/active_support/configurable.rb:73 def configure; end @@ -4076,8 +4013,6 @@ end # # pkg:gem/activesupport#lib/active_support/configuration_file.rb:9 class ActiveSupport::ConfigurationFile - # @return [ConfigurationFile] a new instance of ConfigurationFile - # # pkg:gem/activesupport#lib/active_support/configuration_file.rb:12 def initialize(content_path); end @@ -4124,8 +4059,6 @@ class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end # # pkg:gem/activesupport#lib/active_support/continuous_integration.rb:24 class ActiveSupport::ContinuousIntegration - # @return [ContinuousIntegration] a new instance of ContinuousIntegration - # # pkg:gem/activesupport#lib/active_support/continuous_integration.rb:64 def initialize; end @@ -4161,8 +4094,6 @@ class ActiveSupport::ContinuousIntegration # pkg:gem/activesupport#lib/active_support/continuous_integration.rb:116 def report(title, &block); end - # Returns the value of attribute results. - # # pkg:gem/activesupport#lib/active_support/continuous_integration.rb:33 def results; end @@ -4179,8 +4110,6 @@ class ActiveSupport::ContinuousIntegration # Returns true if all steps were successful. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/continuous_integration.rb:81 def success?; end @@ -4227,15 +4156,11 @@ module ActiveSupport::CoreExt; end # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:7 module ActiveSupport::CoreExt::ERBUtil - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:28 def h(s); end + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! # A utility method for escaping HTML tag characters. # This method is also aliased as h. # @@ -4245,9 +4170,6 @@ module ActiveSupport::CoreExt::ERBUtil # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:10 def html_escape(s); end - # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. - # This method is not for public consumption! Seriously! - # # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:18 def unwrapped_html_escape(s); end end @@ -4358,8 +4280,6 @@ class ActiveSupport::CurrentAttributes extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker - # @return [CurrentAttributes] a new instance of CurrentAttributes - # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:186 def initialize; end @@ -4378,10 +4298,6 @@ class ActiveSupport::CurrentAttributes # pkg:gem/activesupport#lib/active_support/current_attributes.rb:186 def attributes; end - # Sets the attribute attributes - # - # @param value the value to set the attribute attributes to. - # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:186 def attributes=(_arg0); end @@ -4428,8 +4344,6 @@ class ActiveSupport::CurrentAttributes # pkg:gem/activesupport#lib/active_support/current_attributes.rb:95 def _reset_callbacks=(value); end - # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. - # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:153 def after_reset(*methods, &block); end @@ -4473,6 +4387,8 @@ class ActiveSupport::CurrentAttributes # pkg:gem/activesupport#lib/active_support/current_attributes.rb:103 def instance; end + # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. + # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:155 def reset(*_arg0, **_arg1, &_arg2); end @@ -4481,6 +4397,17 @@ class ActiveSupport::CurrentAttributes # pkg:gem/activesupport#lib/active_support/current_attributes.rb:150 def resets(*methods, &block); end + # Expose one or more attributes within a block. Old values are returned after the block concludes. + # Example demonstrating the common use of needing to set Current attributes outside the request-cycle: + # + # class Chat::PublicationJob < ApplicationJob + # def perform(attributes, room_number, creator) + # Current.set(person: creator) do + # Chat::Publisher.publish(attributes: attributes, room_number: room_number) + # end + # end + # end + # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:155 def set(*_arg0, **_arg1, &_arg2); end @@ -4507,16 +4434,12 @@ class ActiveSupport::CurrentAttributes # pkg:gem/activesupport#lib/active_support/current_attributes.rb:165 def generated_attribute_methods; end - # @private - # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:185 def method_added(name); end # pkg:gem/activesupport#lib/active_support/current_attributes.rb:177 def method_missing(name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/current_attributes.rb:181 def respond_to_missing?(name, _); end end @@ -4567,8 +4490,6 @@ module ActiveSupport::DeepMergeable # override this method to restrict or expand the domain of deep mergeable # values. Defaults to checking that +other+ is of type +self.class+. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/deep_mergeable.rb:49 def deep_merge?(other); end end @@ -4645,8 +4566,6 @@ module ActiveSupport::Dependencies # Private method that helps configuring the autoloaders. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/dependencies.rb:98 def eager_load?(path); end @@ -4685,8 +4604,6 @@ end # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:7 class ActiveSupport::Dependencies::Interlock - # @return [Interlock] a new instance of Interlock - # # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:8 def initialize; end @@ -4774,8 +4691,6 @@ class ActiveSupport::Deprecation # # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') # - # @return [Deprecation] a new instance of Deprecation - # # pkg:gem/activesupport#lib/active_support/deprecation.rb:71 def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end @@ -4888,8 +4803,6 @@ ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) # pkg:gem/activesupport#lib/active_support/deprecation/constant_accessor.rb:5 module ActiveSupport::Deprecation::DeprecatedConstantAccessor class << self - # @private - # # pkg:gem/activesupport#lib/active_support/deprecation/constant_accessor.rb:6 def included(base); end end @@ -4913,8 +4826,6 @@ end # # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:120 class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module - # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy - # # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:128 def initialize(old_const, new_const, deprecator, message: T.unsafe(nil)); end @@ -5006,8 +4917,6 @@ end # # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:87 class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy - # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy - # # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:88 def initialize(instance, method, var = T.unsafe(nil), deprecator:); end @@ -5033,8 +4942,6 @@ end # # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:38 class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy - # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy - # # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:39 def initialize(object, message, deprecator); end @@ -5073,8 +4980,6 @@ end # # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:9 class ActiveSupport::Deprecation::Deprecators - # @return [Deprecators] a new instance of Deprecators - # # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:10 def initialize; end @@ -5161,10 +5066,23 @@ end module ActiveSupport::Deprecation::Disallowed # Returns the configured criteria used to identify deprecation messages # which should be treated as disallowed. + # Sets the criteria used to identify deprecation messages which should be + # disallowed. Can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings.) These are compared against + # the text of the generated deprecation warning. + # + # Additionally the scalar symbol +:all+ may be used to treat all + # deprecations as disallowed. + # + # Deprecations matching a substring or regular expression will be handled + # using the configured Behavior#disallowed_behavior rather than + # Behavior#behavior. # # pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:21 def disallowed_warnings; end + # Returns the configured criteria used to identify deprecation messages + # which should be treated as disallowed. # Sets the criteria used to identify deprecation messages which should be # disallowed. Can be an array containing strings, symbols, or regular # expressions. (Symbols are treated as strings.) These are compared against @@ -5182,13 +5100,9 @@ module ActiveSupport::Deprecation::Disallowed private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:26 def deprecation_disallowed?(message); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:39 def explicitly_allowed?(message); end end @@ -5297,6 +5211,8 @@ module ActiveSupport::Deprecation::Reporting # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:41 def silence(&block); end + # Whether to print a message (silent mode) + # # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:56 def silenced; end @@ -5337,8 +5253,6 @@ module ActiveSupport::Deprecation::Reporting # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:140 def extract_callstack(callstack); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:157 def ignored_callstack?(path); end end @@ -5396,6 +5310,8 @@ module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering def subclasses; end end +# On MRI `ObjectSpace::WeakMap` keys are weak references. +# So we can simply use WeakMap as a `Set`. # On TruffleRuby `ObjectSpace::WeakMap` keys are strong references. # So we use `object_id` as a key and the actual object as a value. # @@ -5417,8 +5333,6 @@ class ActiveSupport::Digest # pkg:gem/activesupport#lib/active_support/digest.rb:8 def hash_digest_class; end - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/digest.rb:12 def hash_digest_class=(klass); end @@ -5436,8 +5350,6 @@ end # # pkg:gem/activesupport#lib/active_support/duration.rb:14 class ActiveSupport::Duration - # @return [Duration] a new instance of Duration - # # pkg:gem/activesupport#lib/active_support/duration.rb:226 def initialize(value, parts, variable = T.unsafe(nil)); end @@ -5493,9 +5405,6 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:224 def abs(&_arg0); end - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - # # pkg:gem/activesupport#lib/active_support/duration.rb:440 def after(time = T.unsafe(nil)); end @@ -5508,9 +5417,6 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:459 def as_json(options = T.unsafe(nil)); end - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - # # pkg:gem/activesupport#lib/active_support/duration.rb:448 def before(time = T.unsafe(nil)); end @@ -5523,14 +5429,9 @@ class ActiveSupport::Duration # Returns +true+ if +other+ is also a Duration instance, which has the # same parts as this one. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:426 def eql?(other); end - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - # # pkg:gem/activesupport#lib/active_support/duration.rb:439 def from_now(time = T.unsafe(nil)); end @@ -5565,27 +5466,6 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:413 def in_months; end - # Returns the number of seconds that this Duration represents. - # - # 1.minute.to_i # => 60 - # 1.hour.to_i # => 3600 - # 1.day.to_i # => 86400 - # - # Note that this conversion makes some assumptions about the - # duration of some periods, e.g. months are always 1/12 of year - # and years are 365.2425 days: - # - # # equivalent to (1.year / 12).to_i - # 1.month.to_i # => 2629746 - # - # # equivalent to 365.2425.days.to_i - # 1.year.to_i # => 31556952 - # - # In such cases, Ruby's core - # Date[https://docs.ruby-lang.org/en/master/Date.html] and - # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision - # date and time arithmetic. - # # pkg:gem/activesupport#lib/active_support/duration.rb:380 def in_seconds; end @@ -5609,13 +5489,9 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:450 def inspect; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:335 def instance_of?(klass); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:330 def is_a?(klass); end @@ -5625,8 +5501,6 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:473 def iso8601(precision: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:333 def kind_of?(klass); end @@ -5685,19 +5559,12 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:353 def to_s; end - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - # # pkg:gem/activesupport#lib/active_support/duration.rb:447 def until(time = T.unsafe(nil)); end - # Returns the value of attribute value. - # # pkg:gem/activesupport#lib/active_support/duration.rb:133 def value; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:477 def variable?; end @@ -5709,13 +5576,9 @@ class ActiveSupport::Duration # pkg:gem/activesupport#lib/active_support/duration.rb:516 def method_missing(*_arg0, **_arg1, &_arg2); end - # @raise [TypeError] - # # pkg:gem/activesupport#lib/active_support/duration.rb:520 def raise_type_error(other); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:512 def respond_to_missing?(method, _); end @@ -5780,52 +5643,32 @@ end # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:12 class ActiveSupport::Duration::ISO8601Parser - # @return [ISO8601Parser] a new instance of ISO8601Parser - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:34 def initialize(string); end - # Returns the value of attribute mode. - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:32 def mode; end - # Sets the attribute mode - # - # @param value the value to set the attribute mode to. - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:32 def mode=(_arg0); end # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:41 def parse!; end - # Returns the value of attribute parts. - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:31 def parts; end - # Returns the value of attribute scanner. - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:31 def scanner; end - # Returns the value of attribute sign. - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:32 def sign; end - # Sets the attribute sign - # - # @param value the value to set the attribute sign to. - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:32 def sign=(_arg0); end private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:83 def finished?; end @@ -5834,8 +5677,6 @@ class ActiveSupport::Duration::ISO8601Parser # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:88 def number; end - # @raise [ParsingError] - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:96 def raise_parsing_error(reason = T.unsafe(nil)); end @@ -5891,8 +5732,6 @@ ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash # # pkg:gem/activesupport#lib/active_support/duration/iso8601_serializer.rb:6 class ActiveSupport::Duration::ISO8601Serializer - # @return [ISO8601Serializer] a new instance of ISO8601Serializer - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_serializer.rb:9 def initialize(duration, precision: T.unsafe(nil)); end @@ -5913,8 +5752,6 @@ class ActiveSupport::Duration::ISO8601Serializer # pkg:gem/activesupport#lib/active_support/duration/iso8601_serializer.rb:38 def normalize; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration/iso8601_serializer.rb:51 def week_mixed_with_date?(parts); end end @@ -5925,6 +5762,8 @@ ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil # pkg:gem/activesupport#lib/active_support/duration.rb:130 ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) +# length of a gregorian year (365.2425 days) +# # pkg:gem/activesupport#lib/active_support/duration.rb:120 ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) @@ -5937,23 +5776,19 @@ ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) # pkg:gem/activesupport#lib/active_support/duration.rb:113 ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) -# 1/12 of a gregorian year -# # pkg:gem/activesupport#lib/active_support/duration.rb:117 ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) # pkg:gem/activesupport#lib/active_support/duration.rb:116 ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) -# length of a gregorian year (365.2425 days) +# 1/12 of a gregorian year # # pkg:gem/activesupport#lib/active_support/duration.rb:118 ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) # pkg:gem/activesupport#lib/active_support/duration.rb:15 class ActiveSupport::Duration::Scalar < ::Numeric - # @return [Scalar] a new instance of Scalar - # # pkg:gem/activesupport#lib/active_support/duration.rb:19 def initialize(value); end @@ -5990,13 +5825,9 @@ class ActiveSupport::Duration::Scalar < ::Numeric # pkg:gem/activesupport#lib/active_support/duration.rb:17 def to_s(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute value. - # # pkg:gem/activesupport#lib/active_support/duration.rb:16 def value; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/duration.rb:93 def variable?; end @@ -6005,8 +5836,6 @@ class ActiveSupport::Duration::Scalar < ::Numeric # pkg:gem/activesupport#lib/active_support/duration.rb:98 def calculate(op, other); end - # @raise [TypeError] - # # pkg:gem/activesupport#lib/active_support/duration.rb:108 def raise_type_error(other); end end @@ -6016,8 +5845,6 @@ ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) # pkg:gem/activesupport#lib/active_support/editor.rb:6 class ActiveSupport::Editor - # @return [Editor] a new instance of Editor - # # pkg:gem/activesupport#lib/active_support/editor.rb:48 def initialize(url_pattern); end @@ -6076,8 +5903,6 @@ end # # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:35 class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile - # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration - # # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:54 def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end @@ -6126,8 +5951,6 @@ end # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:36 class ActiveSupport::EncryptedConfiguration::InvalidContentError < ::RuntimeError - # @return [InvalidContentError] a new instance of InvalidContentError - # # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:37 def initialize(content_path); end @@ -6137,29 +5960,21 @@ end # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:46 class ActiveSupport::EncryptedConfiguration::InvalidKeyError < ::RuntimeError - # @return [InvalidKeyError] a new instance of InvalidKeyError - # # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:47 def initialize(content_path, key); end end # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:8 class ActiveSupport::EncryptedFile - # @return [EncryptedFile] a new instance of EncryptedFile - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:42 def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:); end # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:83 def change(&block); end - # Returns the value of attribute content_path. - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def content_path; end - # Returns the value of attribute env_key. - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def env_key; end @@ -6174,18 +5989,12 @@ class ActiveSupport::EncryptedFile # Returns truthy if #key is truthy. Returns falsy otherwise. Unlike #key, # does not raise MissingKeyError when +raise_if_missing_key+ is true. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:58 def key?; end - # Returns the value of attribute key_path. - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def key_path; end - # Returns the value of attribute raise_if_missing_key. - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def raise_if_missing_key; end @@ -6206,8 +6015,6 @@ class ActiveSupport::EncryptedFile private - # @raise [InvalidKeyLengthError] - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:129 def check_key_length; end @@ -6220,8 +6027,6 @@ class ActiveSupport::EncryptedFile # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:112 def encryptor; end - # @raise [MissingKeyError] - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:125 def handle_missing_key; end @@ -6248,24 +6053,18 @@ ActiveSupport::EncryptedFile::CIPHER = T.let(T.unsafe(nil), String) # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:23 class ActiveSupport::EncryptedFile::InvalidKeyLengthError < ::RuntimeError - # @return [InvalidKeyLengthError] a new instance of InvalidKeyLengthError - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:24 def initialize; end end # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:9 class ActiveSupport::EncryptedFile::MissingContentError < ::RuntimeError - # @return [MissingContentError] a new instance of MissingContentError - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:10 def initialize(content_path); end end # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:15 class ActiveSupport::EncryptedFile::MissingKeyError < ::RuntimeError - # @return [MissingKeyError] a new instance of MissingKeyError - # # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:16 def initialize(key_path:, env_key:); end end @@ -6281,17 +6080,11 @@ module ActiveSupport::EnumerableCoreExt::Constants def const_missing(name); end end -# HACK: For performance reasons, Enumerable shouldn't have any constants of its own. -# So we move SoleItemExpectedError into ActiveSupport::EnumerableCoreExt. -# # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:25 ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:9 class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer - # @raise [ArgumentError] - # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer - # # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:15 def initialize(env); end @@ -6300,8 +6093,6 @@ class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer # Returns true if we're in the development or test environment. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:36 def local?; end @@ -6347,8 +6138,6 @@ ActiveSupport::EnvironmentInquirer::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Ar # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:26 class ActiveSupport::ErrorReporter - # @return [ErrorReporter] a new instance of ErrorReporter - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:35 def initialize(*subscribers, logger: T.unsafe(nil)); end @@ -6367,15 +6156,9 @@ class ActiveSupport::ErrorReporter # pkg:gem/activesupport#lib/active_support/error_reporter.rb:218 def add_middleware(middleware); end - # Returns the value of attribute debug_mode. - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 def debug_mode; end - # Sets the attribute debug_mode - # - # @param value the value to set the attribute debug_mode to. - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 def debug_mode=(_arg0); end @@ -6429,15 +6212,9 @@ class ActiveSupport::ErrorReporter # pkg:gem/activesupport#lib/active_support/error_reporter.rb:79 def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil)); end - # Returns the value of attribute logger. - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 def logger; end - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 def logger=(_arg0); end @@ -6485,8 +6262,6 @@ class ActiveSupport::ErrorReporter # Otherwise you can use #unexpected to report an error which does accept a # string argument. # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:233 def report(error, handled: T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end @@ -6560,8 +6335,6 @@ ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) # pkg:gem/activesupport#lib/active_support/error_reporter.rb:298 class ActiveSupport::ErrorReporter::ErrorContextMiddlewareStack - # @return [ErrorContextMiddlewareStack] a new instance of ErrorContextMiddlewareStack - # # pkg:gem/activesupport#lib/active_support/error_reporter.rb:299 def initialize; end @@ -6805,8 +6578,6 @@ ActiveSupport::EventContext::FIBER_KEY = T.let(T.unsafe(nil), Symbol) # # pkg:gem/activesupport#lib/active_support/event_reporter.rb:271 class ActiveSupport::EventReporter - # @return [EventReporter] a new instance of EventReporter - # # pkg:gem/activesupport#lib/active_support/event_reporter.rb:286 def initialize(*subscribers, raise_on_error: T.unsafe(nil)); end @@ -6841,8 +6612,6 @@ class ActiveSupport::EventReporter # Check if debug mode is currently enabled. Debug mode is enabled on the reporter # via +with_debug+, and in local environments. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/event_reporter.rb:420 def debug_mode?; end @@ -6936,8 +6705,6 @@ class ActiveSupport::EventReporter # pkg:gem/activesupport#lib/active_support/event_reporter.rb:311 def subscribe(subscriber, &filter); end - # :nodoc - # # pkg:gem/activesupport#lib/active_support/event_reporter.rb:278 def subscribers; end @@ -7030,8 +6797,6 @@ class ActiveSupport::EventReporter # pkg:gem/activesupport#lib/active_support/event_reporter.rb:548 def payload_filter; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/event_reporter.rb:540 def raise_on_error?; end @@ -7065,15 +6830,9 @@ module ActiveSupport::ExecutionContext # pkg:gem/activesupport#lib/active_support/execution_context.rb:100 def current_attributes_instances; end - # Returns the value of attribute nestable. - # # pkg:gem/activesupport#lib/active_support/execution_context.rb:38 def nestable; end - # Sets the attribute nestable - # - # @param value the value to set the attribute nestable to. - # # pkg:gem/activesupport#lib/active_support/execution_context.rb:38 def nestable=(_arg0); end @@ -7101,13 +6860,9 @@ end # pkg:gem/activesupport#lib/active_support/execution_context.rb:5 class ActiveSupport::ExecutionContext::Record - # @return [Record] a new instance of Record - # # pkg:gem/activesupport#lib/active_support/execution_context.rb:8 def initialize; end - # Returns the value of attribute current_attributes_instances. - # # pkg:gem/activesupport#lib/active_support/execution_context.rb:6 def current_attributes_instances; end @@ -7117,8 +6872,6 @@ class ActiveSupport::ExecutionContext::Record # pkg:gem/activesupport#lib/active_support/execution_context.rb:14 def push; end - # Returns the value of attribute store. - # # pkg:gem/activesupport#lib/active_support/execution_context.rb:6 def store; end end @@ -7191,8 +6944,6 @@ class ActiveSupport::ExecutionWrapper # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:14 def _run_callbacks=(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:118 def active?; end @@ -7256,18 +7007,9 @@ class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:33 def before(target); end - # Returns the value of attribute hook - # - # @return [Object] the current value of hook - # # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def hook; end - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def hook=(_); end @@ -7297,18 +7039,9 @@ class ActiveSupport::ExecutionWrapper::RunHook < ::Struct # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:26 def before(target); end - # Returns the value of attribute hook - # - # @return [Object] the current value of hook - # # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def hook; end - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def hook=(_); end @@ -7374,8 +7107,6 @@ class ActiveSupport::FileUpdateChecker # changes. The array of files and list of directories cannot be changed # after FileUpdateChecker has been initialized. # - # @return [FileUpdateChecker] a new instance of FileUpdateChecker - # # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:44 def initialize(files, dirs = T.unsafe(nil), &block); end @@ -7394,8 +7125,6 @@ class ActiveSupport::FileUpdateChecker # updated_at values are cached until the block is executed via +execute+ # or +execute_if_updated+. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:66 def updated?; end @@ -7479,8 +7208,6 @@ end # pkg:gem/activesupport#lib/active_support/gzip.rb:18 class ActiveSupport::Gzip::Stream < ::StringIO - # @return [Stream] a new instance of Stream - # # pkg:gem/activesupport#lib/active_support/gzip.rb:19 def initialize(*_arg0); end @@ -7537,8 +7264,6 @@ end # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:55 class ActiveSupport::HashWithIndifferentAccess < ::Hash - # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:70 def initialize(constructor = T.unsafe(nil)); end @@ -7642,8 +7367,6 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # Returns +true+ so that Array#extract_options! finds members of # this class. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:58 def extractable_options?; end @@ -7674,27 +7397,9 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:267 def fetch_values(*indices, &block); end - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:172 def has_key?(key); end - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:171 def include?(key); end @@ -7705,20 +7410,9 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.key?(:key) # => true # hash.key?('key') # => true # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:167 def key?(key); end - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:173 def member?(key); end @@ -7729,35 +7423,6 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:287 def merge(*hashes, &block); end - # Updates the receiver in-place, merging in the hashes passed as arguments: - # - # hash_1 = ActiveSupport::HashWithIndifferentAccess.new - # hash_1[:key] = 'value' - # - # hash_2 = ActiveSupport::HashWithIndifferentAccess.new - # hash_2[:key] = 'New Value!' - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } - # - # The arguments can be either an - # +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+. - # In either case the merge respects the semantics of indifferent access. - # - # If the argument is a regular hash with keys +:key+ and "key" only one - # of the values end up in the receiver, but which one is unspecified. - # - # When given a block, the value for duplicated keys will be determined - # by the result of invoking the block with the duplicated key, the value - # in the receiver, and the value in +other_hash+. The rules for duplicated - # keys follow the semantics of indifferent access: - # - # hash_1[:key] = 10 - # hash_2['key'] = 12 - # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:159 def merge!(*other_hashes, &block); end @@ -7887,29 +7552,15 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:253 def values_at(*keys); end - # Like +merge+ but the other way around: Merges the receiver into the - # argument and returns a new hash with indifferent access as result: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['a'] = nil - # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:300 def with_defaults(other_hash); end - # Same semantics as +reverse_merge+ but modifies the receiver in-place. - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:306 def with_defaults!(other_hash); end # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:62 def with_indifferent_access; end - # Returns a hash with indifferent access that includes everything except given keys. - # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access - # hash.except(:a, "b") # => {c: 10}.with_indifferent_access - # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access - # # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:328 def without(*keys); end @@ -7946,8 +7597,6 @@ ActiveSupport::HashWithIndifferentAccess::NOT_GIVEN = T.let(T.unsafe(nil), Objec module ActiveSupport::HtmlSafeTranslation extend ::ActiveSupport::HtmlSafeTranslation - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:30 def html_safe_translation_key?(key); end @@ -7962,8 +7611,6 @@ module ActiveSupport::HtmlSafeTranslation # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:48 def html_safe_translation(translation); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:43 def i18n_option?(name); end end @@ -8331,8 +7978,6 @@ module ActiveSupport::Inflector # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. # Other encodings will raise an ArgumentError. # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/inflector/transliterate.rb:64 def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end @@ -8409,8 +8054,6 @@ ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(n # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:31 class ActiveSupport::Inflector::Inflections - # @return [Inflections] a new instance of Inflections - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:97 def initialize; end @@ -8467,8 +8110,6 @@ class ActiveSupport::Inflector::Inflections # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:159 def acronym(word); end - # Returns the value of attribute acronyms. - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:93 def acronyms; end @@ -8501,8 +8142,6 @@ class ActiveSupport::Inflector::Inflections # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:237 def human(rule, replacement); end - # Returns the value of attribute humans. - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:93 def humans; end @@ -8525,8 +8164,6 @@ class ActiveSupport::Inflector::Inflections # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:168 def plural(rule, replacement); end - # Returns the value of attribute plurals. - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:93 def plurals; end @@ -8538,8 +8175,6 @@ class ActiveSupport::Inflector::Inflections # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:178 def singular(rule, replacement); end - # Returns the value of attribute singulars. - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:93 def singulars; end @@ -8552,8 +8187,6 @@ class ActiveSupport::Inflector::Inflections # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:225 def uncountable(*words); end - # Returns the value of attribute uncountables. - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:93 def uncountables; end @@ -8580,8 +8213,6 @@ end class ActiveSupport::Inflector::Inflections::Uncountables include ::Enumerable - # @return [Uncountables] a new instance of Uncountables - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:40 def initialize; end @@ -8618,8 +8249,6 @@ class ActiveSupport::Inflector::Inflections::Uncountables # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:38 def to_s(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:68 def uncountable?(str); end end @@ -8643,8 +8272,6 @@ end # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:89 class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions - # @return [InheritableOptions] a new instance of InheritableOptions - # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:90 def initialize(parent = T.unsafe(nil)); end @@ -8660,13 +8287,9 @@ class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions # pkg:gem/activesupport#lib/active_support/ordered_options.rb:111 def inspect; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:126 def key?(key); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:130 def overridden?(key); end @@ -8706,21 +8329,15 @@ module ActiveSupport::IsolatedExecutionState # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:46 def delete(key); end - # Returns the value of attribute isolation_level. - # # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:11 def isolation_level; end # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:13 def isolation_level=(level); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:42 def key?(key); end - # Returns the value of attribute scope. - # # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:11 def scope; end @@ -8742,39 +8359,9 @@ module ActiveSupport::JSON # # pkg:gem/activesupport#lib/active_support/json/decoding.rb:24 def decode(json, options = T.unsafe(nil)); end - - # Dumps objects in JSON (JavaScript Object Notation). - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) - # # => "{\"team\":\"rails\",\"players\":\"36\"}" - # - # By default, it generates JSON that is safe to include in JavaScript, as - # it escapes U+2028 (Line Separator) and U+2029 (Paragraph Separator): - # - # ActiveSupport::JSON.encode({ key: "\u2028" }) - # # => "{\"key\":\"\\u2028\"}" - # - # By default, it also generates JSON that is safe to include in HTML, as - # it escapes <, >, and &: - # - # ActiveSupport::JSON.encode({ key: "<>&" }) - # # => "{\"key\":\"\\u003c\\u003e\\u0026\"}" - # - # This behavior can be changed with the +escape_html_entities+ option, or the - # global escape_html_entities_in_json configuration option. - # - # ActiveSupport::JSON.encode({ key: "<>&" }, escape_html_entities: false) - # # => "{\"key\":\"<>&\"}" - # - # For performance reasons, you can set the +escape+ option to false, - # which will skip all escaping: - # - # ActiveSupport::JSON.encode({ key: "\u2028<>&" }, escape: false) - # # => "{\"key\":\"\u2028<>&\"}" - # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:56 - def dump(value, options = T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:56 + def dump(value, options = T.unsafe(nil)); end # Dumps objects in JSON (JavaScript Object Notation). # See http://www.json.org for more info. @@ -8809,14 +8396,6 @@ module ActiveSupport::JSON # pkg:gem/activesupport#lib/active_support/json/encoding.rb:47 def encode(value, options = T.unsafe(nil)); end - # Parses a JSON string (JavaScript Object Notation) into a Ruby object. - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") - # # => {"team" => "rails", "players" => "36"} - # ActiveSupport::JSON.decode("2.39") - # # => 2.39 - # # pkg:gem/activesupport#lib/active_support/json/decoding.rb:33 def load(json, options = T.unsafe(nil)); end @@ -8934,8 +8513,6 @@ ActiveSupport::JSON::Encoding::HTML_ENTITIES_REGEX = T.let(T.unsafe(nil), Regexp # pkg:gem/activesupport#lib/active_support/json/encoding.rb:150 class ActiveSupport::JSON::Encoding::JSONGemCoderEncoder - # @return [JSONGemCoderEncoder] a new instance of JSONGemCoderEncoder - # # pkg:gem/activesupport#lib/active_support/json/encoding.rb:171 def initialize(options = T.unsafe(nil)); end @@ -8953,8 +8530,6 @@ ActiveSupport::JSON::Encoding::JSONGemCoderEncoder::JSON_NATIVE_TYPES = T.let(T. # pkg:gem/activesupport#lib/active_support/json/encoding.rb:75 class ActiveSupport::JSON::Encoding::JSONGemEncoder - # @return [JSONGemEncoder] a new instance of JSONGemEncoder - # # pkg:gem/activesupport#lib/active_support/json/encoding.rb:78 def initialize(options = T.unsafe(nil)); end @@ -8963,8 +8538,6 @@ class ActiveSupport::JSON::Encoding::JSONGemEncoder # pkg:gem/activesupport#lib/active_support/json/encoding.rb:83 def encode(value); end - # Returns the value of attribute options. - # # pkg:gem/activesupport#lib/active_support/json/encoding.rb:76 def options; end @@ -9011,8 +8584,6 @@ ActiveSupport::JSON::Encoding::U2029 = T.let(T.unsafe(nil), String) # # pkg:gem/activesupport#lib/active_support/key_generator.rb:13 class ActiveSupport::KeyGenerator - # @return [KeyGenerator] a new instance of KeyGenerator - # # pkg:gem/activesupport#lib/active_support/key_generator.rb:28 def initialize(secret, options = T.unsafe(nil)); end @@ -9171,8 +8742,6 @@ end # # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:64 class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber - # @return [LogSubscriber] a new instance of LogSubscriber - # # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:133 def initialize; end @@ -9203,8 +8772,6 @@ class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:138 def logger; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:142 def silenced?(event); end @@ -9259,10 +8826,6 @@ class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:93 def logger; end - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:105 def logger=(_arg0); end @@ -9324,8 +8887,6 @@ class ActiveSupport::Logger < ::Logger include ::ActiveSupport::LoggerSilence include ::ActiveSupport::LoggerThreadSafeLevel - # @return [Logger] a new instance of Logger - # # pkg:gem/activesupport#lib/active_support/logger.rb:33 def initialize(*args, **kwargs); end @@ -9346,8 +8907,6 @@ class ActiveSupport::Logger < ::Logger # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') # # => true # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/logger.rb:20 def logger_outputs_to?(logger, *sources); end @@ -9406,8 +8965,6 @@ module ActiveSupport::LoggerThreadSafeLevel private - # Returns the value of attribute local_level_key. - # # pkg:gem/activesupport#lib/active_support/logger_thread_safe_level.rb:48 def local_level_key; end end @@ -9559,8 +9116,6 @@ class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec # If you don't pass a truthy value, the default is set using # +config.active_support.use_message_serializer_for_metadata+. # - # @return [MessageEncryptor] a new instance of MessageEncryptor - # # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:183 def initialize(*args, on_rotation: T.unsafe(nil), **options); end @@ -9626,13 +9181,9 @@ class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec private - # Returns the value of attribute aead_mode. - # # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:371 def aead_mode; end - # Returns the value of attribute aead_mode. - # # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:372 def aead_mode?; end @@ -9871,9 +9422,6 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # If you don't pass a truthy value, the default is set using # +config.active_support.use_message_serializer_for_metadata+. # - # @raise [ArgumentError] - # @return [MessageVerifier] a new instance of MessageVerifier - # # pkg:gem/activesupport#lib/active_support/message_verifier.rb:167 def initialize(*args, on_rotation: T.unsafe(nil), **options); end @@ -9934,8 +9482,6 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # tampered_message = signed_message.chop # editing the message invalidates the signature # verifier.valid_message?(tampered_message) # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/message_verifier.rb:183 def valid_message?(message); end @@ -10018,8 +9564,6 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # pkg:gem/activesupport#lib/active_support/message_verifier.rb:356 def digest_length_in_hex; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/message_verifier.rb:373 def digest_matches_data?(digest, data); end @@ -10029,8 +9573,6 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # pkg:gem/activesupport#lib/active_support/message_verifier.rb:352 def generate_digest(data); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/message_verifier.rb:364 def separator_at?(signed_message, index); end @@ -10065,8 +9607,6 @@ module ActiveSupport::Messages; end class ActiveSupport::Messages::Codec include ::ActiveSupport::Messages::Metadata - # @return [Codec] a new instance of Codec - # # pkg:gem/activesupport#lib/active_support/messages/codec.rb:15 def initialize(**options); end @@ -10090,13 +9630,9 @@ class ActiveSupport::Messages::Codec # pkg:gem/activesupport#lib/active_support/messages/codec.rb:35 def serialize(data); end - # Returns the value of attribute serializer. - # # pkg:gem/activesupport#lib/active_support/messages/codec.rb:23 def serializer; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/codec.rb:60 def use_message_serializer_for_metadata?; end @@ -10130,16 +9666,12 @@ module ActiveSupport::Messages::Metadata # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:43 def deserialize_with_metadata(message, **expected_metadata); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:96 def dual_serialized_metadata_envelope_json?(string); end # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:78 def extract_from_metadata_envelope(envelope, purpose: T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:92 def metadata_envelope?(object); end @@ -10158,8 +9690,6 @@ module ActiveSupport::Messages::Metadata # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:30 def serialize_with_metadata(data, **metadata); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:60 def use_message_serializer_for_metadata?; end @@ -10186,30 +9716,21 @@ ActiveSupport::Messages::Metadata::TIMESTAMP_SERIALIZERS = T.let(T.unsafe(nil), # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:5 class ActiveSupport::Messages::RotationConfiguration - # @return [RotationConfiguration] a new instance of RotationConfiguration - # # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:8 def initialize; end - # Returns the value of attribute encrypted. - # # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:6 def encrypted; end # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:12 def rotate(kind, *args, **options); end - # Returns the value of attribute signed. - # # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:6 def signed; end end # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:7 class ActiveSupport::Messages::RotationCoordinator - # @raise [ArgumentError] - # @return [RotationCoordinator] a new instance of RotationCoordinator - # # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:10 def initialize(&secret_generator); end @@ -10225,35 +9746,23 @@ class ActiveSupport::Messages::RotationCoordinator # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:54 def on_rotation(&callback); end - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:35 def prepend(**options, &block); end - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:26 def rotate(**options, &block); end # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:44 def rotate_defaults; end - # Returns the value of attribute transitional. - # # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:8 def transitional; end - # Sets the attribute transitional - # - # @param value the value to set the attribute transitional to. - # # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:8 def transitional=(_arg0); end private - # @raise [NotImplementedError] - # # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:97 def build(salt, secret_generator:, secret_generator_options:, **options); end @@ -10306,8 +9815,6 @@ module ActiveSupport::Messages::SerializerWithFallback # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:33 def detect_format(dumped); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:44 def fallback?(format); end @@ -10321,8 +9828,6 @@ end module ActiveSupport::Messages::SerializerWithFallback::AllowMarshal private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:50 def fallback?(format); end end @@ -10339,8 +9844,6 @@ module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:86 def dump(object); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:96 def dumped?(dumped); end @@ -10379,8 +9882,6 @@ module ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:63 def dump(object); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:73 def dumped?(dumped); end @@ -10403,8 +9904,6 @@ module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:121 def dump(object); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:129 def dumped?(dumped); end @@ -10413,8 +9912,6 @@ module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:134 def available?; end end @@ -10497,8 +9994,6 @@ class ActiveSupport::Multibyte::Chars # Creates a new Chars instance by wrapping _string_. # - # @return [Chars] a new instance of Chars - # # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:56 def initialize(string, deprecation: T.unsafe(nil)); end @@ -10599,11 +10094,6 @@ class ActiveSupport::Multibyte::Chars # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:176 def tidy_bytes!(*args); end - # Capitalizes the first letter of every word, when possible. - # - # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" - # "日本語".mb_chars.titleize.to_s # => "日本語" - # # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:136 def titlecase; end @@ -10615,18 +10105,12 @@ class ActiveSupport::Multibyte::Chars # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:133 def titleize; end - # Returns the value of attribute wrapped_string. - # # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:50 def to_s; end - # Returns the value of attribute wrapped_string. - # # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:51 def to_str; end - # Returns the value of attribute wrapped_string. - # # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:49 def wrapped_string; end @@ -10639,8 +10123,6 @@ class ActiveSupport::Multibyte::Chars # are included in the search only if the optional second parameter # evaluates to +true+. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:84 def respond_to_missing?(method, include_private); end end @@ -10887,15 +10369,9 @@ module ActiveSupport::Notifications # pkg:gem/activesupport#lib/active_support/notifications.rb:254 def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - # Returns the value of attribute notifier. - # # pkg:gem/activesupport#lib/active_support/notifications.rb:198 def notifier; end - # Sets the attribute notifier - # - # @param value the value to set the attribute notifier to. - # # pkg:gem/activesupport#lib/active_support/notifications.rb:198 def notifier=(_arg0); end @@ -10951,8 +10427,6 @@ end # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:106 class ActiveSupport::Notifications::Event - # @return [Event] a new instance of Event - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:110 def initialize(name, start, ending, transaction_id, payload); end @@ -11004,20 +10478,12 @@ class ActiveSupport::Notifications::Event # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:169 def idle_time; end - # Returns the value of attribute name. - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:107 def name; end - # Returns the value of attribute payload. - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:108 def payload; end - # Sets the attribute payload - # - # @param value the value to set the attribute payload to. - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:108 def payload=(_arg0); end @@ -11032,8 +10498,6 @@ class ActiveSupport::Notifications::Event # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:124 def time; end - # Returns the value of attribute transaction_id. - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:107 def transaction_id; end @@ -11063,8 +10527,6 @@ end class ActiveSupport::Notifications::Fanout include ::ActiveSupport::Notifications::FanoutIteration - # @return [Fanout] a new instance of Fanout - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:56 def initialize; end @@ -11092,8 +10554,6 @@ class ActiveSupport::Notifications::Fanout # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:328 def listeners_for(name); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:332 def listening?(name); end @@ -11122,8 +10582,6 @@ end class ActiveSupport::Notifications::Fanout::BaseGroup include ::ActiveSupport::Notifications::FanoutIteration - # @return [BaseGroup] a new instance of BaseGroup - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:119 def initialize(listeners, name, id, payload); end @@ -11182,8 +10640,6 @@ end class ActiveSupport::Notifications::Fanout::Handle include ::ActiveSupport::Notifications::FanoutIteration - # @return [Handle] a new instance of Handle - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:233 def initialize(notifier, name, id, groups, payload); end @@ -11243,21 +10699,15 @@ end # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:397 class ActiveSupport::Notifications::Fanout::Subscribers::Evented - # @return [Evented] a new instance of Evented - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:400 def initialize(pattern, delegate); end - # Returns the value of attribute delegate. - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:398 def delegate; end # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:408 def group_class; end - # Returns the value of attribute pattern. - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:398 def pattern; end @@ -11267,18 +10717,12 @@ class ActiveSupport::Notifications::Fanout::Subscribers::Evented # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:418 def publish_event(event); end - # Returns the value of attribute silenceable. - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:398 def silenceable; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:426 def silenced?(name); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:430 def subscribed_to?(name); end @@ -11288,21 +10732,15 @@ end # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:360 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher - # @return [Matcher] a new instance of Matcher - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:373 def initialize(pattern); end # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:382 def ===(name); end - # Returns the value of attribute exclusions. - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:361 def exclusions; end - # Returns the value of attribute pattern. - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:361 def pattern; end @@ -11357,13 +10795,9 @@ end # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:8 class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError - # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:11 def initialize(exceptions); end - # Returns the value of attribute exceptions. - # # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:9 def exceptions; end end @@ -11372,8 +10806,6 @@ end # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:9 class ActiveSupport::Notifications::Instrumenter - # @return [Instrumenter] a new instance of Instrumenter - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:12 def initialize(notifier); end @@ -11399,8 +10831,6 @@ class ActiveSupport::Notifications::Instrumenter # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:96 def finish_with_state(listeners_state, name, payload); end - # Returns the value of attribute id. - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:10 def id; end @@ -11428,8 +10858,6 @@ end # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:21 class ActiveSupport::Notifications::Instrumenter::LegacyHandle - # @return [LegacyHandle] a new instance of LegacyHandle - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:34 def initialize(notifier, name, id, payload); end @@ -11442,8 +10870,6 @@ end # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:22 class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper - # @return [Wrapper] a new instance of Wrapper - # # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:23 def initialize(notifier); end @@ -11917,8 +11343,6 @@ end # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:12 class ActiveSupport::NumberHelper::NumberConverter - # @return [NumberConverter] a new instance of NumberConverter - # # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:124 def initialize(number, options); end @@ -11934,13 +11358,9 @@ class ActiveSupport::NumberHelper::NumberConverter # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:14 def namespace?; end - # Returns the value of attribute number. - # # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:19 def number; end - # Returns the value of attribute opts. - # # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:19 def opts; end @@ -12129,8 +11549,6 @@ class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport: # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_size_converter.rb:44 def exponent; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_size_converter.rb:51 def smaller_than_base?; end @@ -12204,8 +11622,6 @@ class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::Num # pkg:gem/activesupport#lib/active_support/number_helper/number_to_phone_converter.rb:55 def regexp_pattern(default_pattern); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/number_helper/number_to_phone_converter.rb:39 def start_with_delimiter?(number); end end @@ -12242,16 +11658,12 @@ end # pkg:gem/activesupport#lib/active_support/number_helper/rounding_helper.rb:5 class ActiveSupport::NumberHelper::RoundingHelper - # @return [RoundingHelper] a new instance of RoundingHelper - # # pkg:gem/activesupport#lib/active_support/number_helper/rounding_helper.rb:8 def initialize(options); end # pkg:gem/activesupport#lib/active_support/number_helper/rounding_helper.rb:20 def digit_count(number); end - # Returns the value of attribute options. - # # pkg:gem/activesupport#lib/active_support/number_helper/rounding_helper.rb:6 def options; end @@ -12269,112 +11681,6 @@ end # pkg:gem/activesupport#lib/active_support/core_ext/numeric/conversions.rb:7 module ActiveSupport::NumericWithFormat - # \Numeric With Format - # - # Provides options for converting numbers into formatted strings. - # Options are provided for phone numbers, currency, percentage, - # precision, positional notation, file size, and pretty printing. - # - # This method is aliased to to_formatted_s. - # - # ==== Options - # - # For details on which formats use which options, see ActiveSupport::NumberHelper - # - # ==== Examples - # - # Phone Numbers: - # 5551234.to_fs(:phone) # => "555-1234" - # 1235551234.to_fs(:phone) # => "123-555-1234" - # 1235551234.to_fs(:phone, area_code: true) # => "(123) 555-1234" - # 1235551234.to_fs(:phone, delimiter: ' ') # => "123 555 1234" - # 1235551234.to_fs(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # 1235551234.to_fs(:phone, country_code: 1) # => "+1-123-555-1234" - # 1235551234.to_fs(:phone, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" - # - # Currency: - # 1234567890.50.to_fs(:currency) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency) # => "$1,234,567,890.51" - # 1234567890.506.to_fs(:currency, precision: 3) # => "$1,234,567,890.506" - # 1234567890.506.to_fs(:currency, round_mode: :down) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency, locale: :fr) # => "1 234 567 890,51 €" - # -1234567890.50.to_fs(:currency, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # - # Percentage: - # 100.to_fs(:percentage) # => "100.000%" - # 100.to_fs(:percentage, precision: 0) # => "100%" - # 1000.to_fs(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" - # 302.24398923423.to_fs(:percentage, precision: 5) # => "302.24399%" - # 302.24398923423.to_fs(:percentage, round_mode: :down) # => "302.243%" - # 1000.to_fs(:percentage, locale: :fr) # => "1 000,000%" - # 100.to_fs(:percentage, format: '%n %') # => "100.000 %" - # - # Delimited: - # 12345678.to_fs(:delimited) # => "12,345,678" - # 12345678.05.to_fs(:delimited) # => "12,345,678.05" - # 12345678.to_fs(:delimited, delimiter: '.') # => "12.345.678" - # 12345678.to_fs(:delimited, delimiter: ',') # => "12,345,678" - # 12345678.05.to_fs(:delimited, separator: ' ') # => "12,345,678 05" - # 12345678.05.to_fs(:delimited, locale: :fr) # => "12 345 678,05" - # 98765432.98.to_fs(:delimited, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # - # Rounded: - # 111.2345.to_fs(:rounded) # => "111.235" - # 111.2345.to_fs(:rounded, precision: 2) # => "111.23" - # 111.2345.to_fs(:rounded, precision: 2, round_mode: :up) # => "111.24" - # 13.to_fs(:rounded, precision: 5) # => "13.00000" - # 389.32314.to_fs(:rounded, precision: 0) # => "389" - # 111.2345.to_fs(:rounded, significant: true) # => "111" - # 111.2345.to_fs(:rounded, precision: 1, significant: true) # => "100" - # 13.to_fs(:rounded, precision: 5, significant: true) # => "13.000" - # 111.234.to_fs(:rounded, locale: :fr) # => "111,234" - # 13.to_fs(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # 389.32314.to_fs(:rounded, precision: 4, significant: true) # => "389.3" - # 1111.2345.to_fs(:rounded, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # Human-friendly size in Bytes: - # 123.to_fs(:human_size) # => "123 Bytes" - # 1234.to_fs(:human_size) # => "1.21 KB" - # 12345.to_fs(:human_size) # => "12.1 KB" - # 1234567.to_fs(:human_size) # => "1.18 MB" - # 1234567890.to_fs(:human_size) # => "1.15 GB" - # 1234567890123.to_fs(:human_size) # => "1.12 TB" - # 1234567890123456.to_fs(:human_size) # => "1.1 PB" - # 1234567890123456789.to_fs(:human_size) # => "1.07 EB" - # 1234567.to_fs(:human_size, precision: 2) # => "1.2 MB" - # 1234567.to_fs(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" - # 483989.to_fs(:human_size, precision: 2) # => "470 KB" - # 1234567.to_fs(:human_size, precision: 2, separator: ',') # => "1,2 MB" - # 1234567890123.to_fs(:human_size, precision: 5) # => "1.1228 TB" - # 524288000.to_fs(:human_size, precision: 5) # => "500 MB" - # - # Human-friendly format: - # 123.to_fs(:human) # => "123" - # 1234.to_fs(:human) # => "1.23 Thousand" - # 12345.to_fs(:human) # => "12.3 Thousand" - # 1234567.to_fs(:human) # => "1.23 Million" - # 1234567890.to_fs(:human) # => "1.23 Billion" - # 1234567890123.to_fs(:human) # => "1.23 Trillion" - # 1234567890123456.to_fs(:human) # => "1.23 Quadrillion" - # 1234567890123456789.to_fs(:human) # => "1230 Quadrillion" - # 489939.to_fs(:human, precision: 2) # => "490 Thousand" - # 489939.to_fs(:human, precision: 2, round_mode: :down) # => "480 Thousand" - # 489939.to_fs(:human, precision: 4) # => "489.9 Thousand" - # 1234567.to_fs(:human, precision: 4, - # significant: false) # => "1.2346 Million" - # 1234567.to_fs(:human, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/conversions.rb:139 def to_formatted_s(format = T.unsafe(nil), options = T.unsafe(nil)); end @@ -12490,8 +11796,6 @@ end # pkg:gem/activesupport#lib/active_support/option_merger.rb:6 class ActiveSupport::OptionMerger - # @return [OptionMerger] a new instance of OptionMerger - # # pkg:gem/activesupport#lib/active_support/option_merger.rb:11 def initialize(context, options); end @@ -12500,8 +11804,6 @@ class ActiveSupport::OptionMerger # pkg:gem/activesupport#lib/active_support/option_merger.rb:16 def method_missing(method, *arguments, &block); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/option_merger.rb:34 def respond_to_missing?(*_arg0, **_arg1, &_arg2); end end @@ -12528,8 +11830,6 @@ class ActiveSupport::OrderedHash < ::Hash # Returns true to make sure that this hash is extractable via Array#extract_options! # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/ordered_hash.rb:46 def extractable_options?; end @@ -12578,14 +11878,14 @@ class ActiveSupport::OrderedOptions < ::Hash # pkg:gem/activesupport#lib/active_support/ordered_options.rb:41 def [](key); end + # make it protected + # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:37 def []=(key, value); end # pkg:gem/activesupport#lib/active_support/ordered_options.rb:45 def dig(key, *identifiers); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:64 def extractable_options?; end @@ -12597,15 +11897,11 @@ class ActiveSupport::OrderedOptions < ::Hash protected - # preserve the original #[] method - # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:34 def _get(_arg0); end private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/ordered_options.rb:60 def respond_to_missing?(name, include_private); end end @@ -12652,8 +11948,6 @@ class ActiveSupport::ParameterFilter # # * :mask - A replaced object when filtered. Defaults to "[FILTERED]". # - # @return [ParameterFilter] a new instance of ParameterFilter - # # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:77 def initialize(filters = T.unsafe(nil), mask: T.unsafe(nil)); end @@ -12707,6 +12001,9 @@ class ActiveSupport::Railtie < ::Rails::Railtie; end # # pkg:gem/activesupport#lib/active_support/core_ext/range/conversions.rb:5 module ActiveSupport::RangeWithFormat + # pkg:gem/activesupport#lib/active_support/core_ext/range/conversions.rb:58 + def to_formatted_s(format = T.unsafe(nil)); end + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. # # This method is aliased to to_formatted_s. @@ -12729,34 +12026,9 @@ module ActiveSupport::RangeWithFormat # # config/initializers/range_formats.rb # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } # - # pkg:gem/activesupport#lib/active_support/core_ext/range/conversions.rb:58 - def to_formatted_s(format = T.unsafe(nil)); end - - # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # range = (1..100) # => 1..100 - # - # range.to_s # => "1..100" - # range.to_fs(:db) # => "BETWEEN '1' AND '100'" - # - # range = (1..) # => 1.. - # range.to_fs(:db) # => ">= '1'" - # - # range = (..100) # => ..100 - # range.to_fs(:db) # => "<= '100'" - # - # == Adding your own range formats to to_fs - # You can add your own formats to the Range::RANGE_FORMATS hash. - # Use the format name as the hash key and a Proc instance. - # - # # config/initializers/range_formats.rb - # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } - # - # pkg:gem/activesupport#lib/active_support/core_ext/range/conversions.rb:51 - def to_fs(format = T.unsafe(nil)); end -end + # pkg:gem/activesupport#lib/active_support/core_ext/range/conversions.rb:51 + def to_fs(format = T.unsafe(nil)); end +end # pkg:gem/activesupport#lib/active_support/core_ext/range/conversions.rb:6 ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) @@ -12784,8 +12056,6 @@ ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) # # pkg:gem/activesupport#lib/active_support/reloader.rb:28 class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper - # @return [Reloader] a new instance of Reloader - # # pkg:gem/activesupport#lib/active_support/reloader.rb:99 def initialize; end @@ -13047,8 +12317,6 @@ end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:19 class ActiveSupport::SafeBuffer < ::String - # @return [SafeBuffer] a new instance of SafeBuffer - # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:70 def initialize(_str = T.unsafe(nil)); end @@ -13133,8 +12401,6 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:171 def gsub!(*args, &block); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:135 def html_safe?; end @@ -13171,8 +12437,6 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 def rstrip!(*args); end - # @raise [SafeConcatError] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:65 def safe_concat(value); end @@ -13273,8 +12537,6 @@ end # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:32 class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError - # @return [SafeConcatError] a new instance of SafeConcatError - # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:33 def initialize; end end @@ -13315,8 +12577,6 @@ ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(n class ActiveSupport::SecureCompareRotator include ::ActiveSupport::SecurityUtils - # @return [SecureCompareRotator] a new instance of SecureCompareRotator - # # pkg:gem/activesupport#lib/active_support/secure_compare_rotator.rb:37 def initialize(value, on_rotation: T.unsafe(nil)); end @@ -13334,8 +12594,6 @@ class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end module ActiveSupport::SecurityUtils private - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/security_utils.rb:11 def fixed_length_secure_compare(a, b); end @@ -13350,8 +12608,6 @@ module ActiveSupport::SecurityUtils def secure_compare(a, b); end class << self - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/security_utils.rb:25 def fixed_length_secure_compare(a, b); end @@ -13392,8 +12648,6 @@ class ActiveSupport::StringInquirer < ::String # pkg:gem/activesupport#lib/active_support/string_inquirer.rb:27 def method_missing(method_name, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/string_inquirer.rb:23 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end @@ -13426,8 +12680,6 @@ end # # pkg:gem/activesupport#lib/active_support/structured_event_subscriber.rb:31 class ActiveSupport::StructuredEventSubscriber < ::ActiveSupport::Subscriber - # @return [StructuredEventSubscriber] a new instance of StructuredEventSubscriber - # # pkg:gem/activesupport#lib/active_support/structured_event_subscriber.rb:56 def initialize; end @@ -13451,8 +12703,6 @@ class ActiveSupport::StructuredEventSubscriber < ::ActiveSupport::Subscriber # pkg:gem/activesupport#lib/active_support/structured_event_subscriber.rb:75 def emit_event(name, payload = T.unsafe(nil), caller_depth: T.unsafe(nil), **kwargs); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/structured_event_subscriber.rb:61 def silenced?(event); end @@ -13525,8 +12775,6 @@ ActiveSupport::StructuredEventSubscriber::DEBUG_CHECK = T.let(T.unsafe(nil), Pro # # pkg:gem/activesupport#lib/active_support/subscriber.rb:32 class ActiveSupport::Subscriber - # @return [Subscriber] a new instance of Subscriber - # # pkg:gem/activesupport#lib/active_support/subscriber.rb:70 def initialize; end @@ -13566,23 +12814,15 @@ class ActiveSupport::Subscriber # pkg:gem/activesupport#lib/active_support/subscriber.rb:108 def find_attached_subscriber; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/subscriber.rb:112 def invalid_event?(event); end - # Returns the value of attribute namespace. - # # pkg:gem/activesupport#lib/active_support/subscriber.rb:84 def namespace; end - # Returns the value of attribute notifier. - # # pkg:gem/activesupport#lib/active_support/subscriber.rb:84 def notifier; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/subscriber.rb:120 def pattern_subscribed?(pattern); end @@ -13592,8 +12832,6 @@ class ActiveSupport::Subscriber # pkg:gem/activesupport#lib/active_support/subscriber.rb:97 def remove_event_subscriber(event); end - # Returns the value of attribute subscriber. - # # pkg:gem/activesupport#lib/active_support/subscriber.rb:84 def subscriber; end end @@ -13635,8 +12873,6 @@ end # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:30 class ActiveSupport::SyntaxErrorProxy::BacktraceLocationProxy - # @return [BacktraceLocationProxy] a new instance of BacktraceLocationProxy - # # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:31 def initialize(loc, ex); end @@ -13747,21 +12983,13 @@ end # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:108 module ActiveSupport::TaggedLogging::LocalTagStorage - # Returns the value of attribute tag_stack. - # # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:109 def tag_stack; end - # Sets the attribute tag_stack - # - # @param value the value to set the attribute tag_stack to. - # # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:109 def tag_stack=(_arg0); end class << self - # @private - # # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:111 def extended(base); end end @@ -13769,8 +12997,6 @@ end # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:70 class ActiveSupport::TaggedLogging::TagStack - # @return [TagStack] a new instance of TagStack - # # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:73 def initialize; end @@ -13786,8 +13012,6 @@ class ActiveSupport::TaggedLogging::TagStack # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:78 def push_tags(tags); end - # Returns the value of attribute tags. - # # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:71 def tags; end end @@ -13848,7 +13072,7 @@ class ActiveSupport::TestCase < ::Minitest::Test def assert_not_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # pkg:gem/activesupport#lib/active_support/test_case.rb:269 - def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end + def assert_not_includes(obj, sub, msg = T.unsafe(nil)); end # pkg:gem/activesupport#lib/active_support/test_case.rb:280 def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end @@ -14262,14 +13486,6 @@ module ActiveSupport::Testing::Assertions # pkg:gem/activesupport#lib/active_support/testing/assertions.rb:48 def assert_nothing_raised; end - # Asserts that a block raises one of +exp+. This is an enhancement of the - # standard Minitest assertion method with the ability to test error - # messages. - # - # assert_raises(ArgumentError, match: /incorrect param/i) do - # perform_service(param: 'exception') - # end - # # pkg:gem/activesupport#lib/active_support/testing/assertions.rb:39 def assert_raise(*exp, match: T.unsafe(nil), &block); end @@ -14501,85 +13717,36 @@ end # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 class ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector::Report < ::Struct - # Returns the value of attribute context - # - # @return [Object] the current value of context - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def context; end - # Sets the attribute context - # - # @param value [Object] the value to set the attribute context to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def context=(_); end - # Returns the value of attribute error - # - # @return [Object] the current value of error - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def error; end - # Sets the attribute error - # - # @param value [Object] the value to set the attribute error to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def error=(_); end - # Returns the value of attribute handled - # - # @return [Object] the current value of handled - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def handled; end - # Sets the attribute handled - # - # @param value [Object] the value to set the attribute handled to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def handled=(_); end - # Returns the value of attribute handled - # - # @return [Object] the current value of handled - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:12 def handled?; end - # Returns the value of attribute severity - # - # @return [Object] the current value of severity - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def severity; end - # Sets the attribute severity - # - # @param value [Object] the value to set the attribute severity to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def severity=(_); end - # Returns the value of attribute source - # - # @return [Object] the current value of source - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def source; end - # Sets the attribute source - # - # @param value [Object] the value to set the attribute source to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 def source=(_); end @@ -14710,28 +13877,20 @@ end # pkg:gem/activesupport#lib/active_support/testing/event_reporter_assertions.rb:11 class ActiveSupport::Testing::EventReporterAssertions::EventCollector::Event - # @return [Event] a new instance of Event - # # pkg:gem/activesupport#lib/active_support/testing/event_reporter_assertions.rb:14 def initialize(event_data); end - # Returns the value of attribute event_data. - # # pkg:gem/activesupport#lib/active_support/testing/event_reporter_assertions.rb:12 def event_data; end # pkg:gem/activesupport#lib/active_support/testing/event_reporter_assertions.rb:18 def inspect; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/event_reporter_assertions.rb:22 def matches?(name, payload, tags); end private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/event_reporter_assertions.rb:34 def matches_hash?(expected_hash, event_key); end end @@ -14780,8 +13939,6 @@ module ActiveSupport::Testing::Isolation def run; end class << self - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/isolation.rb:16 def forking_env?; end @@ -14880,8 +14037,6 @@ end # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:8 class ActiveSupport::Testing::Parallelization - # @return [Parallelization] a new instance of Parallelization - # # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:36 def initialize(worker_count); end @@ -14932,18 +14087,9 @@ end # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 class ActiveSupport::Testing::Parallelization::PrerecordResultClass < ::Struct - # Returns the value of attribute name - # - # @return [Object] the current value of name - # # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 def name=(_); end @@ -14969,16 +14115,12 @@ end class ActiveSupport::Testing::Parallelization::Server include ::DRb::DRbUndumped - # @return [Server] a new instance of Server - # # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:14 def initialize; end # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:32 def <<(o); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:64 def active_workers?; end @@ -14988,8 +14130,6 @@ class ActiveSupport::Testing::Parallelization::Server # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:37 def pop; end - # @raise [DRb::DRbConnError] - # # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:21 def record(reporter, result); end @@ -15008,8 +14148,6 @@ end # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:6 class ActiveSupport::Testing::Parallelization::Worker - # @return [Worker] a new instance of Worker - # # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:7 def initialize(number, url); end @@ -15042,32 +14180,24 @@ end # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:5 class ActiveSupport::Testing::ParallelizeExecutor - # @return [ParallelizeExecutor] a new instance of ParallelizeExecutor - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:8 def initialize(size:, with:, threshold: T.unsafe(nil)); end # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:22 def <<(work); end - # Returns the value of attribute parallelize_with. - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:6 def parallelize_with; end # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:26 def shutdown; end - # Returns the value of attribute size. - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:6 def size; end # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:15 def start; end - # Returns the value of attribute threshold. - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:6 def threshold; end @@ -15079,8 +14209,6 @@ class ActiveSupport::Testing::ParallelizeExecutor # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:72 def execution_info; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:60 def many_workers?; end @@ -15090,13 +14218,9 @@ class ActiveSupport::Testing::ParallelizeExecutor # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:47 def parallelize; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:52 def parallelized?; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:56 def should_parallelize?; end @@ -15152,8 +14276,6 @@ end # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:9 class ActiveSupport::Testing::SimpleStubs - # @return [SimpleStubs] a new instance of SimpleStubs - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:12 def initialize; end @@ -15170,8 +14292,6 @@ class ActiveSupport::Testing::SimpleStubs # Returns true if any stubs are set, false if there are none # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:53 def stubbed?; end @@ -15196,48 +14316,21 @@ end # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct - # Returns the value of attribute method_name - # - # @return [Object] the current value of method_name - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def method_name; end - # Sets the attribute method_name - # - # @param value [Object] the value to set the attribute method_name to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def method_name=(_); end - # Returns the value of attribute object - # - # @return [Object] the current value of object - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def object; end - # Sets the attribute object - # - # @param value [Object] the value to set the attribute object to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def object=(_); end - # Returns the value of attribute original_method - # - # @return [Object] the current value of original_method - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def original_method; end - # Sets the attribute original_method - # - # @param value [Object] the value to set the attribute original_method to. - # @return [Object] the newly set value - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def original_method=(_); end @@ -15421,44 +14514,14 @@ module ActiveSupport::Testing::TimeHelpers # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:133 def travel_to(date_or_time, with_usec: T.unsafe(nil)); end - # Returns the current time back to its original state, by removing the stubs added by - # +travel+, +travel_to+, and +freeze_time+. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # This method also accepts a block, which brings the stubs back at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back do - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # end - # - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:239 def unfreeze_time; end private - # Returns the value of attribute in_block. - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:270 def in_block; end - # Sets the attribute in_block - # - # @param value the value to set the attribute in_block to. - # # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:270 def in_block=(_arg0); end @@ -15505,8 +14568,6 @@ class ActiveSupport::TimeWithZone include ::DateAndTime::Compatibility include ::Comparable - # @return [TimeWithZone] a new instance of TimeWithZone - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:51 def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end @@ -15563,8 +14624,6 @@ class ActiveSupport::TimeWithZone # So that +self+ acts_like?(:time). # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:506 def acts_like_time?; end @@ -15639,15 +14698,11 @@ class ActiveSupport::TimeWithZone # Returns true if the current object's time is within the specified # +min+ and +max+ time. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:255 def between?(min, max); end # An instance of ActiveSupport::TimeWithZone is never blank # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:517 def blank?; end @@ -15672,8 +14727,6 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:398 def change(options); end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:72 def comparable_time; end @@ -15687,8 +14740,6 @@ class ActiveSupport::TimeWithZone # Time.zone.parse("2012-5-30").dst? # => true # Time.zone.parse("2012-11-30").dst? # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:100 def dst?; end @@ -15697,8 +14748,6 @@ class ActiveSupport::TimeWithZone # Returns +true+ if +other+ is equal to current object. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:290 def eql?(other); end @@ -15719,50 +14768,27 @@ class ActiveSupport::TimeWithZone # Returns true if the current object's time is in the future. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:285 def future?; end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:73 def getgm; end - # Returns a Time instance of the simultaneous time in the system timezone. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:92 def getlocal(utc_offset = T.unsafe(nil)); end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:74 def getutc; end - # Returns true if the current time zone is set to UTC. - # - # Time.zone = 'UTC' # => 'UTC' - # Time.zone.now.utc? # => true - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.now.utc? # => false - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:114 def gmt?; end - # Returns the offset from current time to UTC time in seconds. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:120 def gmt_offset; end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:75 def gmtime; end - # Returns the offset from current time to UTC time in seconds. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:121 def gmtoff; end @@ -15780,23 +14806,6 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:202 def httpdate; end - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:324 def in(other); end @@ -15817,35 +14826,15 @@ class ActiveSupport::TimeWithZone # Say we're a Time to thwart type checking. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:511 def is_a?(klass); end - # Returns true if the current time is within Daylight Savings \Time for the - # specified time zone. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.parse("2012-5-30").dst? # => true - # Time.zone.parse("2012-11-30").dst? # => false - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:103 def isdst; end - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:167 def iso8601(fraction_digits = T.unsafe(nil)); end - # Say we're a Time to thwart type checking. - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:514 def kind_of?(klass); end @@ -15878,11 +14867,6 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:449 def month; end - # Returns true if the current object's time falls within - # the next day (tomorrow). - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:275 def next_day?; end @@ -15891,8 +14875,6 @@ class ActiveSupport::TimeWithZone # Returns true if the current object's time is in the past. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:260 def past?; end @@ -15901,24 +14883,15 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:78 def period; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:521 def present?; end - # Returns true if the current object's time falls within - # the previous day (yesterday). - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:282 def prev_day?; end # respond_to_missing? is not called in some cases, such as when type conversion is # performed with Kernel#String # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:541 def respond_to?(sym, include_priv = T.unsafe(nil)); end @@ -15930,42 +14903,15 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:210 def rfc2822; end - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:168 def rfc3339(fraction_digits = T.unsafe(nil)); end - # Returns a string of the object's date and time in the RFC 2822 standard - # format. - # - # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:213 def rfc822; end # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:449 def sec; end - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:323 def since(other); end @@ -15980,8 +14926,6 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:64 def time; end - # Returns the value of attribute time_zone. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:49 def time_zone; end @@ -16013,15 +14957,6 @@ class ActiveSupport::TimeWithZone # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:469 def to_f; end - # Returns a string of the object's date and time. - # - # This method is aliased to to_formatted_s. - # - # Accepts an optional format: - # * :default - default value, mimics Ruby Time#to_s format. - # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). - # * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb. - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:237 def to_formatted_s(format = T.unsafe(nil)); end @@ -16068,24 +15003,15 @@ class ActiveSupport::TimeWithZone # Returns true if the current object's time falls within # the current day. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:266 def today?; end # Returns true if the current object's time falls within # the next day (tomorrow). # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:272 def tomorrow?; end - # Returns the object's date and time as an integer number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_i # => 1417709320 - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:480 def tv_sec; end @@ -16104,8 +15030,6 @@ class ActiveSupport::TimeWithZone # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' # Time.zone.now.utc? # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:111 def utc?; end @@ -16134,8 +15058,6 @@ class ActiveSupport::TimeWithZone # Returns true if the current object's time falls within # the previous day (yesterday). # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:279 def yesterday?; end @@ -16149,8 +15071,6 @@ class ActiveSupport::TimeWithZone private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:593 def duration_of_variable_length?(obj); end @@ -16163,8 +15083,6 @@ class ActiveSupport::TimeWithZone # Ensure proxy class responds to all methods that underlying time instance # responds to. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:549 def respond_to_missing?(sym, include_priv); end @@ -16212,8 +15130,6 @@ class ActiveSupport::TimeZone # :stopdoc: # - # @return [TimeZone] a new instance of TimeZone - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:310 def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end @@ -16247,8 +15163,6 @@ class ActiveSupport::TimeZone # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:386 def at(*args); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:578 def dst?(time); end @@ -16303,13 +15217,9 @@ class ActiveSupport::TimeZone # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ # if a match is found. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:355 def match?(re); end - # Returns the value of attribute name. - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:297 def name; end @@ -16366,8 +15276,6 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:476 def rfc3339(str); end @@ -16416,8 +15324,6 @@ class ActiveSupport::TimeZone # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:533 def tomorrow; end - # Returns the value of attribute tzinfo. - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:298 def tzinfo; end @@ -16444,8 +15350,6 @@ class ActiveSupport::TimeZone private - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:592 def parts_to_time(parts, now); end @@ -16561,8 +15465,6 @@ ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer) # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:140 class ActiveSupport::XMLConverter - # @return [XMLConverter] a new instance of XMLConverter - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:151 def initialize(xml, disallowed_types = T.unsafe(nil)); end @@ -16571,39 +15473,27 @@ class ActiveSupport::XMLConverter private - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:222 def become_array?(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:218 def become_content?(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:226 def become_empty_string?(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:232 def become_hash?(value); end # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:172 def deep_to_h(value); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:241 def garbage?(value); end # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:161 def normalize_keys(params); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:236 def nothing?(value); end @@ -16625,8 +15515,6 @@ ActiveSupport::XMLConverter::DISALLOWED_TYPES = T.let(T.unsafe(nil), Array) # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:143 class ActiveSupport::XMLConverter::DisallowedType < ::StandardError - # @return [DisallowedType] a new instance of DisallowedType - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:144 def initialize(type); end end @@ -16647,15 +15535,9 @@ module ActiveSupport::XmlMini # pkg:gem/activesupport#lib/active_support/xml_mini.rb:106 def backend=(name); end - # Returns the value of attribute depth. - # # pkg:gem/activesupport#lib/active_support/xml_mini.rb:97 def depth; end - # Sets the attribute depth - # - # @param value the value to set the attribute depth to. - # # pkg:gem/activesupport#lib/active_support/xml_mini.rb:97 def depth=(_arg0); end @@ -16755,8 +15637,6 @@ module ActiveSupport::XmlMini_REXML # element:: # XML element to be checked. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:133 def empty_content?(element); end @@ -16791,8 +15671,6 @@ module ActiveSupport::XmlMini_REXML # element:: # XML element to merge into hash # - # @raise [REXML::ParseException] - # # pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:54 def merge_element!(hash, element, depth); end @@ -16984,8 +15862,6 @@ class Array # pkg:gem/activesupport#lib/active_support/core_ext/array/inquiry.rb:16 def inquiry; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:104 def present?; end @@ -17038,15 +15914,6 @@ class Array # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:24 def to(position); end - # Extends Array#to_s to convert a collection of elements into a - # comma separated id list if :db argument is given as the format. - # - # This method is aliased to to_formatted_s. - # - # Blog.all.to_fs(:db) # => "1,2,3" - # Blog.none.to_fs(:db) # => "null" - # [1,2].to_fs # => "[1, 2]" - # # pkg:gem/activesupport#lib/active_support/core_ext/array/conversions.rb:106 def to_formatted_s(format = T.unsafe(nil)); end @@ -17209,14 +16076,6 @@ class Array # pkg:gem/activesupport#lib/active_support/core_ext/array/conversions.rb:183 def to_xml(options = T.unsafe(nil)); end - # Returns a copy of the Array excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] - # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] - # - # Note: This is an optimization of Enumerable#excluding that uses Array#- - # instead of Array#reject for performance reasons. - # # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:50 def without(*elements); end @@ -17279,6 +16138,9 @@ class BigDecimal < ::Numeric # # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:134 def as_json(options = T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/core_ext/big_decimal/conversions.rb:8 + def to_s(format = T.unsafe(nil)); end end # pkg:gem/activesupport#lib/active_support/core_ext/class/attribute.rb:6 @@ -17407,15 +16269,11 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:108 def -(other); end - # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:160 def <=>(other); end # Duck-types as a Date-like class. See Object#acts_like?. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date/acts_like.rb:7 def acts_like_date?; end @@ -17448,33 +16306,21 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:211 def as_json(options = T.unsafe(nil)); end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:72 def at_beginning_of_day; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:88 def at_end_of_day; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:80 def at_midday; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:82 def at_middle_of_day; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:71 def at_midnight; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:81 def at_noon; end @@ -17517,19 +16363,12 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:85 def end_of_day; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then adds the specified number of seconds - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:64 def in(seconds); end - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" - # # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:67 def inspect; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:78 def midday; end @@ -17538,8 +16377,6 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:75 def middle_of_day; end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:70 def midnight; end @@ -17549,8 +16386,6 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:107 def minus_without_duration(_arg0); end - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:79 def noon; end @@ -17560,8 +16395,6 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:97 def plus_without_duration(_arg0); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date/blank.rb:15 def present?; end @@ -17576,32 +16409,6 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:61 def since(seconds); end - # Convert to a formatted string. See DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_fs(:db) # => "2007-11-10" - # date.to_formatted_s(:db) # => "2007-11-10" - # - # date.to_fs(:short) # => "10 Nov" - # date.to_fs(:number) # => "20071110" - # date.to_fs(:long) # => "November 10, 2007" - # date.to_fs(:long_ordinal) # => "November 10th, 2007" - # date.to_fs(:rfc822) # => "10 Nov 2007" - # date.to_fs(:rfc2822) # => "10 Nov 2007" - # date.to_fs(:iso8601) # => "2007-11-10" - # - # == Adding your own date formats to to_fs - # You can add your own formats to the Date::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a date argument as the value. - # - # # config/initializers/date_formats.rb - # Date::DATE_FORMATS[:month_and_year] = '%B %Y' - # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } - # # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:60 def to_formatted_s(format = T.unsafe(nil)); end @@ -17647,8 +16454,6 @@ class Date # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. ENV['TZ']. # If the application's timezone is needed, then use +in_time_zone+ instead. # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:69 def to_time(form = T.unsafe(nil)); end @@ -17677,15 +16482,9 @@ class Date # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:27 def beginning_of_week=(week_start); end - # Returns the value of attribute beginning_of_week_default. - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:14 def beginning_of_week_default; end - # Sets the attribute beginning_of_week_default - # - # @param value the value to set the attribute beginning_of_week_default to. - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:14 def beginning_of_week_default=(_arg0); end @@ -17696,8 +16495,6 @@ class Date # Returns week start day symbol (e.g. +:monday+), or raises an +ArgumentError+ for invalid day symbol. # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:32 def find_beginning_of_week!(week_start); end @@ -17723,8 +16520,6 @@ module DateAndTime; end module DateAndTime::Calculations # Returns true if the date/time falls after date_or_time. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:72 def after?(date_or_time); end @@ -17754,90 +16549,32 @@ module DateAndTime::Calculations # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:331 def all_year; end - # Returns a new date/time at the start of the month. - # - # today = Date.today # => Thu, 18 Jun 2015 - # today.beginning_of_month # => Mon, 01 Jun 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 - # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:128 def at_beginning_of_month; end - # Returns a new date/time at the start of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_quarter # => Wed, 01 Jul 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:143 def at_beginning_of_quarter; end - # Returns a new date/time representing the start of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # +DateTime+ objects have their time set to 0:00. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:271 def at_beginning_of_week(start_day = T.unsafe(nil)); end - # Returns a new date/time at the beginning of the year. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_year # => Thu, 01 Jan 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:182 def at_beginning_of_year; end - # Returns a new date/time representing the end of the month. - # DateTime objects will have a time set to 23:59:59. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:300 def at_end_of_month; end - # Returns a new date/time at the end of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.end_of_quarter # => Wed, 30 Sep 2015 - # - # +DateTime+ objects will have a time set to 23:59:59. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:158 def at_end_of_quarter; end - # Returns a new date/time representing the end of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 23:59:59. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:286 def at_end_of_week(start_day = T.unsafe(nil)); end - # Returns a new date/time representing the end of the year. - # DateTime objects will have a time set to 23:59:59. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:307 def at_end_of_year; end # Returns true if the date/time falls before date_or_time. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:67 def before?(date_or_time); end @@ -17940,8 +16677,6 @@ module DateAndTime::Calculations # Returns true if the date/time is in the future. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:52 def future?; end @@ -17950,21 +16685,12 @@ module DateAndTime::Calculations # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:240 def last_month; end - # Short-hand for months_ago(3). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:248 def last_quarter; end - # Returns a new date/time representing the given day in the previous week. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 0:00 unless +same_time+ is true. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:227 def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end - # Returns a new date/time representing the previous weekday. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:237 def last_weekday; end @@ -17989,10 +16715,6 @@ module DateAndTime::Calculations # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:102 def months_since(months); end - # Returns true if the date/time is tomorrow. - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:38 def next_day?; end @@ -18037,29 +16759,19 @@ module DateAndTime::Calculations # Returns true if the date/time does not fall on a Saturday or Sunday. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:62 def on_weekday?; end # Returns true if the date/time falls on a Saturday or Sunday. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:57 def on_weekend?; end # Returns true if the date/time is in the past. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:47 def past?; end - # Returns true if the date/time is yesterday. - # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:44 def prev_day?; end @@ -18108,8 +16820,6 @@ module DateAndTime::Calculations # Returns true if the date/time is today. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:30 def today?; end @@ -18120,8 +16830,6 @@ module DateAndTime::Calculations # Returns true if the date/time is tomorrow. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:35 def tomorrow?; end @@ -18152,8 +16860,6 @@ module DateAndTime::Calculations # Returns true if the date/time is yesterday. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:41 def yesterday?; end @@ -18231,15 +16937,11 @@ class DateTime < ::Date # Duck-types as a Date-like class. See Object#acts_like?. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/acts_like.rb:8 def acts_like_date?; end # Duck-types as a Time-like class. See Object#acts_like?. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/acts_like.rb:13 def acts_like_time?; end @@ -18264,53 +16966,33 @@ class DateTime < ::Date # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:221 def as_json(options = T.unsafe(nil)); end - # Returns a new DateTime representing the start of the day (0:00). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:127 def at_beginning_of_day; end - # Returns a new DateTime representing the start of the hour (hh:00:00). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:149 def at_beginning_of_hour; end - # Returns a new DateTime representing the start of the minute (hh:mm:00). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:161 def at_beginning_of_minute; end - # Returns a new DateTime representing the end of the day (23:59:59). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:143 def at_end_of_day; end - # Returns a new DateTime representing the end of the hour (hh:59:59). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:155 def at_end_of_hour; end - # Returns a new DateTime representing the end of the minute (hh:mm:59). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:167 def at_end_of_minute; end - # Returns a new DateTime representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:135 def at_midday; end - # Returns a new DateTime representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:137 def at_middle_of_day; end - # Returns a new DateTime representing the start of the day (0:00). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:126 def at_midnight; end - # Returns a new DateTime representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:136 def at_noon; end @@ -18350,8 +17032,6 @@ class DateTime < ::Date # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => DateTime.new(1981, 8, 1, 22, 35, 0) # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0) # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:51 def change(options); end @@ -18383,44 +17063,21 @@ class DateTime < ::Date # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:53 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:192 def getgm; end - # Returns a Time instance of the simultaneous time in the system timezone. - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:178 def getlocal(utc_offset = T.unsafe(nil)); end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:193 def getutc; end - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:194 def gmtime; end - # Returns a new DateTime representing the time a number of seconds since the - # instance time. Do not use this method in combination with x.months, use - # months_since instead! - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:119 def in(seconds); end - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:62 def inspect; end @@ -18429,8 +17086,6 @@ class DateTime < ::Date # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:170 def localtime(utc_offset = T.unsafe(nil)); end - # Returns a new DateTime representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:133 def midday; end @@ -18439,13 +17094,9 @@ class DateTime < ::Date # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:130 def middle_of_day; end - # Returns a new DateTime representing the start of the day (0:00). - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:125 def midnight; end - # Returns a new DateTime representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:134 def noon; end @@ -18454,8 +17105,6 @@ class DateTime < ::Date # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:96 def nsec; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/blank.rb:15 def present?; end @@ -18501,6 +17150,9 @@ class DateTime < ::Date # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:81 def to_f; end + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:44 + def to_formatted_s(format = T.unsafe(nil)); end + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. # # This method is aliased to to_formatted_s. @@ -18529,52 +17181,21 @@ class DateTime < ::Date # Time::DATE_FORMATS[:month_and_year] = '%B %Y' # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } # - # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:44 - def to_formatted_s(format = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:37 + def to_fs(format = T.unsafe(nil)); end - # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. + # Converts +self+ to an integer number of seconds since the Unix epoch. # - # ==== Examples + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:86 + def to_i; end + + # Return an instance of +Time+ with the same UTC offset + # as +self+. # - # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 - # - # datetime.to_fs(:db) # => "2007-12-04 00:00:00" - # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_fs(:number) # => "20071204000000" - # datetime.to_fs(:short) # => "04 Dec 00:00" - # datetime.to_fs(:long) # => "December 04, 2007 00:00" - # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" - # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" - # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" - # - # ==== Adding your own datetime formats to +to_fs+ - # - # DateTime formats are shared with Time. You can add your own to the - # Time::DATE_FORMATS hash. Use the format name as the hash key and - # either a strftime string or Proc instance that takes a time or - # datetime argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - # - # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:37 - def to_fs(format = T.unsafe(nil)); end - - # Converts +self+ to an integer number of seconds since the Unix epoch. - # - # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:86 - def to_i; end - - # Return an instance of +Time+ with the same UTC offset - # as +self+. - # - # pkg:gem/activesupport#lib/active_support/core_ext/date_time/compatibility.rb:9 - def to_time; end - - # Returns the fraction of a second as microseconds + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/compatibility.rb:9 + def to_time; end + + # Returns the fraction of a second as microseconds # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:91 def usec; end @@ -18589,8 +17210,6 @@ class DateTime < ::Date # Returns +true+ if offset == 0. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:197 def utc?; end @@ -18686,6 +17305,16 @@ Digest::UUID::URL_NAMESPACE = T.let(T.unsafe(nil), String) # pkg:gem/activesupport#lib/active_support/core_ext/digest/uuid.rb:11 Digest::UUID::X500_NAMESPACE = T.let(T.unsafe(nil), String) +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:39 module ERB::Util include ::ActiveSupport::CoreExt::ERBUtil @@ -18920,8 +17549,6 @@ module Enumerable # The negative of the Enumerable#include?. Returns +true+ if the # collection does not include the object. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:118 def exclude?(object); end @@ -18997,8 +17624,6 @@ module Enumerable # much like any?, so people.many? { |p| p.age > 26 } returns +true+ # if more than one person is over 26. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:93 def many?; end @@ -19050,17 +17675,6 @@ module Enumerable # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:211 def sole; end - # Returns a copy of the enumerable excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" - # # => ["David", "Rafael"] - # - # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] - # # => ["David", "Rafael"] - # - # {foo: 1, bar: 2, baz: 3}.excluding :bar - # # => {foo: 1, baz: 3} - # # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:136 def without(*elements); end end @@ -19091,8 +17705,6 @@ class FalseClass # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:71 def blank?; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:75 def present?; end @@ -19200,8 +17812,6 @@ class Hash # pkg:gem/activesupport#lib/active_support/core_ext/object/deep_dup.rb:43 def deep_dup; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/deep_merge.rb:40 def deep_merge?(other); end @@ -19304,14 +17914,9 @@ class Hash # is extractable, Array#extract_options! pops it from # the Array when it is the last element of the Array. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/array/extract_options.rb:9 def extractable_options?; end - # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: - # - # { a: 1 }.with_indifferent_access['a'] # => 1 # Called when object is nested under an object that receives # #with_indifferent_access. This method will be called on the current object # by the enclosing object and is aliased to #with_indifferent_access by @@ -19326,8 +17931,6 @@ class Hash # pkg:gem/activesupport#lib/active_support/core_ext/hash/indifferent_access.rb:23 def nested_under_indifferent_access; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:118 def present?; end @@ -19350,8 +17953,6 @@ class Hash # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:20 def reverse_merge!(other_hash); end - # Destructive +reverse_merge+. - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:23 def reverse_update(other_hash); end @@ -19398,37 +17999,12 @@ class Hash # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:34 def symbolize_keys!; end - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. - # - # hash = { 'name' => 'Rob', 'age' => '28' } - # - # hash.symbolize_keys - # # => {:name=>"Rob", :age=>"28"} - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:30 def to_options; end - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:37 def to_options!; end - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # {name: 'David', nationality: 'Danish'}.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # {name: 'David', nationality: 'Danish'}.to_query('user') - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # # pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:92 def to_param(namespace = T.unsafe(nil)); end @@ -19515,22 +18091,9 @@ class Hash # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:74 def to_xml(options = T.unsafe(nil)); end - # Merges the caller into +other_hash+. For example, - # - # options = options.reverse_merge(size: 25, velocity: 10) - # - # is equivalent to - # - # options = { size: 25, velocity: 10 }.merge(options) - # - # This is particularly useful for initializing an options hash - # with default values. - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:17 def with_defaults(other_hash); end - # Destructive +reverse_merge+. - # # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:24 def with_defaults!(other_hash); end @@ -19729,6 +18292,16 @@ IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + class IO::EAGAINWaitReadable < ::Errno::EAGAIN include ::IO::WaitReadable end @@ -19751,14 +18324,18 @@ IO::PRIORITY = T.let(T.unsafe(nil), Integer) IO::READABLE = T.let(T.unsafe(nil), Integer) IO::WRITABLE = T.let(T.unsafe(nil), Integer) +# Use `IPAddr#as_json` from the IPAddr gem if the version is 1.2.7 or higher. +# +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:244 +class IPAddr + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:245 + def as_json(options = T.unsafe(nil)); end +end + # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:6 class Integer < ::Numeric include ::ActiveSupport::NumericWithFormat - # Returns a Duration instance matching the number of months provided. - # - # 2.months # => 2 months - # # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:13 def month; end @@ -19775,8 +18352,6 @@ class Integer < ::Numeric # 6.multiple_of?(5) # => false # 10.multiple_of?(2) # => true # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/integer/multiple.rb:9 def multiple_of?(number); end @@ -19806,10 +18381,6 @@ class Integer < ::Numeric # pkg:gem/activesupport#lib/active_support/core_ext/integer/inflections.rb:15 def ordinalize; end - # Returns a Duration instance matching the number of years provided. - # - # 2.years # => 2 years - # # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:21 def year; end @@ -19821,6 +18392,8 @@ class Integer < ::Numeric def years; end end +Integer::GMP_VERSION = T.let(T.unsafe(nil), String) + # pkg:gem/activesupport#lib/active_support/core_ext/kernel/reporting.rb:3 module Kernel # class_eval on an object acts like +singleton_class.class_eval+. @@ -19926,12 +18499,15 @@ class LoadError < ::ScriptError # Returns true if the given path name (except perhaps for the ".rb" # extension) is the missing file which caused the exception to be raised. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/load_error.rb:6 def is_missing?(location); end end +# == Attribute Accessors +# +# Extends the module object with class/module and instance accessors for +# class/module attributes, just like the native attr* accessors for instance +# attributes. # == Attribute Accessors per Thread # # Extends the module object with class/module and instance accessors for @@ -19993,17 +18569,12 @@ class Module # m.name # => "M" # m.anonymous? # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/module/anonymous.rb:27 def anonymous?; end # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:53 def as_json(options = T.unsafe(nil)); end - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:20 def attr_internal(*attrs); end @@ -20023,175 +18594,12 @@ class Module # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:10 def attr_internal_writer(*attrs); end - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_accessor(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:213 def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end - # Defines a class attribute and creates a class and instance reader methods. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_reader(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_styles # => [:long, :short] - # - # @raise [TypeError] - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:75 def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - # Defines a class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_writer(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - # - # @raise [TypeError] - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:140 def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end @@ -20412,7 +18820,7 @@ class Module # pkg:gem/activesupport#lib/active_support/core_ext/module/delegation.rb:218 def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end - # deprecate :foo, deprecator: MyLib.deprecator + # deprecate :foo, deprecator: MyLib.deprecator # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator # # A deprecator is typically an instance of ActiveSupport::Deprecation, but you can also pass any object that responds @@ -20546,8 +18954,6 @@ class Module # Person.new.hair_colors # => [:brown, :black, :blonde, :red] # Person.new.hair_styles # => [:long, :short] # - # @raise [TypeError] - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:55 def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end @@ -20596,8 +19002,6 @@ class Module # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] # Person.class_variable_get("@@hair_styles") # => [:long, :short] # - # @raise [TypeError] - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:121 def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end @@ -20618,161 +19022,69 @@ class Module # The parent of top-level and anonymous modules is Object. # # M.module_parent # => Object - # Module.new.module_parent # => Object - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:37 - def module_parent; end - - # Returns the name of the module containing this one. - # - # M::N.module_parent_name # => "M" - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:9 - def module_parent_name; end - - # Returns all the parents of this module according to its name, ordered from - # nested outwards. The receiver is not contained within the result. - # - # module M - # module N - # end - # end - # X = M::N - # - # M.module_parents # => [Object] - # M::N.module_parents # => [M, Object] - # X.module_parents # => [M, Object] - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:53 - def module_parents; end - - # Replaces the existing method definition, if there is one, with the passed - # block as its body. - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:17 - def redefine_method(method, &block); end - - # Replaces the existing singleton method definition, if there is one, with - # the passed block as its body. - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:26 - def redefine_singleton_method(method, &block); end - - # Removes the named method, if it exists. - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/remove_method.rb:7 - def remove_possible_method(method); end - - # Removes the named singleton method, if it exists. - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/remove_method.rb:14 - def remove_possible_singleton_method(method); end - - # Marks the named method as intended to be redefined, if it exists. - # Suppresses the Ruby method redefinition warning. Prefer - # #redefine_method where possible. - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:7 - def silence_redefinition_of_method(method); end - - # Defines both class and instance accessors for class attributes. - # - # class Account - # thread_mattr_accessor :user - # end - # - # Account.user = "DHH" - # Account.user # => "DHH" - # Account.new.user # => "DHH" - # - # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. - # If a subclass changes the value, the parent class' value is not changed. - # If the parent class changes the value, the value of subclasses is not changed. - # - # class Customer < Account - # end - # - # Account.user # => "DHH" - # Customer.user # => nil - # Customer.user = "Rafael" - # Customer.user # => "Rafael" - # Account.user # => "DHH" - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class Current - # thread_mattr_accessor :user, instance_writer: false, instance_reader: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class Current - # thread_mattr_accessor :user, instance_accessor: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # A default value may be specified using the +:default+ option. Because - # multiple threads can access the default value, non-frozen default values - # will be duped and frozen. - # - # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:174 - def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - - # Defines a per-thread class attribute and creates class and instance reader methods. - # The underlying per-thread class variable is set to +nil+, if it is not previously defined. - # - # module Current - # thread_mattr_reader :user - # end - # - # Current.user = "DHH" - # Current.user # => "DHH" - # Thread.new { Current.user }.value # => nil + # Module.new.module_parent # => Object # - # The attribute name must be a valid method name in Ruby. + # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:37 + def module_parent; end + + # Returns the name of the module containing this one. # - # module Foo - # thread_mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname + # M::N.module_parent_name # => "M" # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. + # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:9 + def module_parent_name; end + + # Returns all the parents of this module according to its name, ordered from + # nested outwards. The receiver is not contained within the result. # - # class Current - # thread_mattr_reader :user, instance_reader: false + # module M + # module N + # end # end + # X = M::N # - # Current.new.user # => NoMethodError + # M.module_parents # => [Object] + # M::N.module_parents # => [M, Object] + # X.module_parents # => [M, Object] # - # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:81 - def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:53 + def module_parents; end - # Defines a per-thread class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. - # - # module Current - # thread_mattr_writer :user - # end + # Replaces the existing method definition, if there is one, with the passed + # block as its body. # - # Current.user = "DHH" - # Thread.current[:attr_Current_user] # => "DHH" + # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:17 + def redefine_method(method, &block); end + + # Replaces the existing singleton method definition, if there is one, with + # the passed block as its body. # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. + # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:26 + def redefine_singleton_method(method, &block); end + + # Removes the named method, if it exists. # - # class Current - # thread_mattr_writer :user, instance_writer: false - # end + # pkg:gem/activesupport#lib/active_support/core_ext/module/remove_method.rb:7 + def remove_possible_method(method); end + + # Removes the named singleton method, if it exists. # - # Current.new.user = "DHH" # => NoMethodError + # pkg:gem/activesupport#lib/active_support/core_ext/module/remove_method.rb:14 + def remove_possible_singleton_method(method); end + + # Marks the named method as intended to be redefined, if it exists. + # Suppresses the Ruby method redefinition warning. Prefer + # #redefine_method where possible. # + # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:7 + def silence_redefinition_of_method(method); end + + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:174 + def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:81 + def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:123 def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end @@ -20883,8 +19195,6 @@ class Module def attr_internal_define(attr_name, type); end class << self - # Returns the value of attribute attr_internal_naming_format. - # # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:23 def attr_internal_naming_format; end @@ -21054,8 +19364,6 @@ class NameError < ::StandardError # end # # => true # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/name_error.rb:44 def missing_name?(name); end @@ -21082,8 +19390,6 @@ class NilClass # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:56 def blank?; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:60 def present?; end @@ -21136,10 +19442,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:177 def blank?; end - # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes - # - # 2.bytes # => 2 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:18 def byte; end @@ -21150,10 +19452,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:15 def bytes; end - # Returns a Duration instance matching the number of days provided. - # - # 2.days # => 2 days - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:40 def day; end @@ -21164,10 +19462,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:37 def days; end - # Returns the number of bytes equivalent to the exabytes provided. - # - # 2.exabytes # => 2_305_843_009_213_693_952 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:66 def exabyte; end @@ -21178,10 +19472,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:63 def exabytes; end - # Returns a Duration instance matching the number of fortnights provided. - # - # 2.fortnights # => 4 weeks - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:56 def fortnight; end @@ -21192,10 +19482,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:53 def fortnights; end - # Returns the number of bytes equivalent to the gigabytes provided. - # - # 2.gigabytes # => 2_147_483_648 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:42 def gigabyte; end @@ -21206,10 +19492,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:39 def gigabytes; end - # Returns a Duration instance matching the number of hours provided. - # - # 2.hours # => 2 hours - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:32 def hour; end @@ -21220,8 +19502,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:29 def hours; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:13 def html_safe?; end @@ -21234,10 +19514,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:63 def in_milliseconds; end - # Returns the number of bytes equivalent to the kilobytes provided. - # - # 2.kilobytes # => 2048 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:26 def kilobyte; end @@ -21248,10 +19524,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:23 def kilobytes; end - # Returns the number of bytes equivalent to the megabytes provided. - # - # 2.megabytes # => 2_097_152 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:34 def megabyte; end @@ -21262,10 +19534,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:31 def megabytes; end - # Returns a Duration instance matching the number of minutes provided. - # - # 2.minutes # => 2 minutes - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:24 def minute; end @@ -21276,10 +19544,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:21 def minutes; end - # Returns the number of bytes equivalent to the petabytes provided. - # - # 2.petabytes # => 2_251_799_813_685_248 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:58 def petabyte; end @@ -21290,15 +19554,9 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:55 def petabytes; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:181 def present?; end - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:16 def second; end @@ -21309,10 +19567,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:13 def seconds; end - # Returns the number of bytes equivalent to the terabytes provided. - # - # 2.terabytes # => 2_199_023_255_552 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:50 def terabyte; end @@ -21323,10 +19577,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:47 def terabytes; end - # Returns a Duration instance matching the number of weeks provided. - # - # 2.weeks # => 2 weeks - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:48 def week; end @@ -21337,10 +19587,6 @@ class Numeric # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:45 def weeks; end - # Returns the number of bytes equivalent to the zettabytes provided. - # - # 2.zettabytes # => 2_361_183_241_434_822_606_848 - # # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:74 def zettabyte; end @@ -21429,8 +19675,6 @@ class Object < ::BasicObject # # Stringish.new.acts_like?(:string) # => true # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/acts_like.rb:33 def acts_like?(duck); end @@ -21471,13 +19715,9 @@ class Object < ::BasicObject # False for method objects; # true otherwise. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/duplicable.rb:26 def duplicable?; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:7 def html_safe?; end @@ -21493,8 +19733,6 @@ class Object < ::BasicObject # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument # doesn't respond to +#include?+. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/inclusion.rb:15 def in?(another_object); end @@ -21725,14 +19963,13 @@ class Pathname # pkg:gem/activesupport#lib/active_support/core_ext/pathname/existence.rb:20 def existence; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/pathname/blank.rb:17 def present?; end end module Process extend ::SQLite3::ForkSafety::CoreExt + extend ::Dalli::PIDCache::CoreExt extend ::ConnectionPool::ForkTracker extend ::RedisClient::PIDCache::CoreExt extend ::ActiveSupport::ForkTracker::CoreExt @@ -21764,13 +20001,6 @@ class Range # pkg:gem/activesupport#lib/active_support/core_ext/range/compare_range.rb:41 def include?(value); end - # Compare two ranges and see if they overlap each other - # (1..5).overlap?(4..6) # => true - # (1..5).overlap?(7..9) # => false - # - # @raise [TypeError] - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/range/overlap.rb:39 def overlaps?(_arg0); end @@ -21804,8 +20034,6 @@ class Regexp # Regexp.new(".").multiline? # => false # Regexp.new(".", Regexp::MULTILINE).multiline? # => true # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/regexp.rb:11 def multiline?; end end @@ -21813,9 +20041,13 @@ end # pkg:gem/activesupport#lib/active_support/core_ext/securerandom.rb:5 module SecureRandom class << self + # Remove check when Ruby 3.3 is the minimum supported version + # # pkg:gem/activesupport#lib/active_support/core_ext/securerandom.rb:45 def base36(n = T.unsafe(nil)); end + # Remove check when Ruby 3.3 is the minimum supported version + # # pkg:gem/activesupport#lib/active_support/core_ext/securerandom.rb:20 def base58(n = T.unsafe(nil)); end end @@ -21835,8 +20067,6 @@ module Singleton # # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/duplicable.rb:66 def duplicable?; end end @@ -21852,8 +20082,6 @@ class String # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/behavior.rb:5 def acts_like_string?; end @@ -21905,18 +20133,6 @@ class String # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:153 def blank?; end - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # 'active_record'.camelize # => "ActiveRecord" - # 'active_record'.camelize(:lower) # => "activeRecord" - # 'active_record/errors'.camelize # => "ActiveRecord::Errors" - # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" - # - # See ActiveSupport::Inflector.camelize. - # # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:111 def camelcase(first_letter = T.unsafe(nil)); end @@ -22019,8 +20235,6 @@ class String # "hello".exclude? "ol" # => true # "hello".exclude? ?h # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/exclude.rb:10 def exclude?(string); end @@ -22163,8 +20377,6 @@ class String # utf_8_str.is_utf8? # => true # iso_str.is_utf8? # => false # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/string/multibyte.rb:57 def is_utf8?; end @@ -22282,8 +20494,6 @@ class String # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:35 def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:165 def present?; end @@ -22395,20 +20605,6 @@ class String # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:227 def tableize; end - # Capitalizes all the words and replaces some characters in the string to create - # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the \Rails internals. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'man from the boondocks'.titleize # => "Man From The Boondocks" - # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" - # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" - # - # See ActiveSupport::Inflector.titleize. - # # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:129 def titlecase(keep_id_suffix: T.unsafe(nil)); end @@ -22605,8 +20801,6 @@ class Symbol # pkg:gem/activesupport#lib/active_support/core_ext/symbol/starts_ends_with.rb:5 def ends_with?(*_arg0); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:130 def present?; end @@ -22638,23 +20832,14 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:298 def +(other); end - # Time#- can also be used to determine the number of seconds between two Time instances. - # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances - # are coerced into values that Time#- will recognize - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:308 def -(other); end - # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances - # can be chronologically compared with a Time - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:338 def <=>(other); end # Duck-types as a Time-like class. See Object#acts_like?. # - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/time/acts_like.rb:7 def acts_like_time?; end @@ -22685,53 +20870,33 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:201 def as_json(options = T.unsafe(nil)); end - # Returns a new Time representing the start of the day (0:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:236 def at_beginning_of_day; end - # Returns a new Time representing the start of the hour (x:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:263 def at_beginning_of_hour; end - # Returns a new Time representing the start of the minute (x:xx:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:279 def at_beginning_of_minute; end - # Returns a new Time representing the end of the day, 23:59:59.999999 - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:257 def at_end_of_day; end - # Returns a new Time representing the end of the hour, x:59:59.999999 - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:273 def at_end_of_hour; end - # Returns a new Time representing the end of the minute, x:xx:59.999999 - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:288 def at_end_of_minute; end - # Returns a new Time representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:244 def at_midday; end - # Returns a new Time representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:246 def at_middle_of_day; end - # Returns a new Time representing the start of the day (0:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:235 def at_midnight; end - # Returns a new Time representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:245 def at_noon; end @@ -22772,8 +20937,6 @@ class Time # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:123 def change(options); end @@ -22801,9 +20964,6 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:282 def end_of_minute; end - # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances - # can be eql? to an equivalent Time - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:348 def eql?(other); end @@ -22825,13 +20985,9 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:69 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - # Returns a new Time representing the time a number of seconds since the instance time - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:228 def in(seconds); end - # Returns a new Time representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:242 def midday; end @@ -22840,8 +20996,6 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:239 def middle_of_day; end - # Returns a new Time representing the start of the day (0:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:234 def midnight; end @@ -22876,8 +21030,6 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:376 def next_year(years = T.unsafe(nil)); end - # Returns a new Time representing the middle of the day (12:00) - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:243 def noon; end @@ -22887,8 +21039,6 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:297 def plus_without_duration(_arg0); end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:196 def present?; end @@ -22910,7 +21060,7 @@ class Time # Aliased to +xmlschema+ for compatibility with +DateTime+ # # pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:74 - def rfc3339(*_arg0); end + def rfc3339(fraction_digits = T.unsafe(nil)); end # Returns the fraction of a second as a +Rational+ # @@ -22942,33 +21092,6 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:225 def since(seconds); end - # Converts to a formatted string. See DATE_FORMATS for built-in formats. - # - # This method is aliased to to_formatted_s. - # - # time = Time.now # => 2007-01-18 06:10:17 -06:00 - # - # time.to_fs(:time) # => "06:10" - # time.to_formatted_s(:time) # => "06:10" - # - # time.to_fs(:db) # => "2007-01-18 06:10:17" - # time.to_fs(:number) # => "20070118061017" - # time.to_fs(:short) # => "18 Jan 06:10" - # time.to_fs(:long) # => "January 18, 2007 06:10" - # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:rfc2822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" - # - # == Adding your own time formats to +to_fs+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } - # # pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:62 def to_formatted_s(format = T.unsafe(nil)); end @@ -23013,9 +21136,6 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:18 def ===(other); end - # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime - # instances can be used when called with a single argument - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:60 def at(time_or_number, *args, **_arg2); end @@ -23077,8 +21197,6 @@ class Time # # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date # - # @raise [ArgumentError] - # # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:69 def rfc3339(str); end @@ -23135,15 +21253,9 @@ class Time # pkg:gem/activesupport#lib/active_support/core_ext/time/zones.rb:41 def zone=(time_zone); end - # Returns the value of attribute zone_default. - # # pkg:gem/activesupport#lib/active_support/core_ext/time/zones.rb:10 def zone_default; end - # Sets the attribute zone_default - # - # @param value the value to set the attribute zone_default to. - # # pkg:gem/activesupport#lib/active_support/core_ext/time/zones.rb:10 def zone_default=(_arg0); end end @@ -23169,8 +21281,6 @@ class TrueClass # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:86 def blank?; end - # @return [Boolean] - # # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:90 def present?; end diff --git a/sorbet/rbi/gems/addressable@2.8.7.rbi b/sorbet/rbi/gems/addressable@2.8.7.rbi index 652f89ac1..67ff77b77 100644 --- a/sorbet/rbi/gems/addressable@2.8.7.rbi +++ b/sorbet/rbi/gems/addressable@2.8.7.rbi @@ -28,6 +28,7 @@ module Addressable::IDNA # pkg:gem/addressable#lib/addressable/idna/pure.rb:93 def to_unicode(input); end + # @deprecated Use {String#unicode_normalize(:nfkc)} instead # @deprecated Use {String#unicode_normalize(:nfkc)} instead # # pkg:gem/addressable#lib/addressable/idna/pure.rb:117 @@ -43,8 +44,6 @@ module Addressable::IDNA # pkg:gem/addressable#lib/addressable/idna/pure.rb:488 def punycode_adapt(delta, numpoints, firsttime); end - # @return [Boolean] - # # pkg:gem/addressable#lib/addressable/idna/pure.rb:456 def punycode_basic?(codepoint); end @@ -58,8 +57,6 @@ module Addressable::IDNA # pkg:gem/addressable#lib/addressable/idna/pure.rb:474 def punycode_decode_digit(codepoint); end - # @return [Boolean] - # # pkg:gem/addressable#lib/addressable/idna/pure.rb:461 def punycode_delimiter?(codepoint); end @@ -72,7 +69,8 @@ module Addressable::IDNA # Unicode aware downcase method. # # @api private - # @param input [String] The input string. + # @param [String] input + # The input string. # @return [String] The downcased result. # # pkg:gem/addressable#lib/addressable/idna/pure.rb:132 @@ -134,6 +132,9 @@ class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end # pkg:gem/addressable#lib/addressable/idna/pure.rb:211 class Addressable::IDNA::PunycodeOverflow < ::StandardError; end +# This is a sparse Unicode table. Codepoints without entries are +# assumed to have the value: [0, 0, nil, nil, nil, nil, nil] +# # pkg:gem/addressable#lib/addressable/idna/pure.rb:163 Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash) @@ -177,7 +178,8 @@ Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp) class Addressable::Template # Creates a new Addressable::Template object. # - # @param pattern [#to_str] The URI Template pattern. + # @param [#to_str] pattern The URI Template pattern. + # # @return [Addressable::Template] The initialized Template object. # # pkg:gem/addressable#lib/addressable/template.rb:234 @@ -186,20 +188,17 @@ class Addressable::Template # Returns true if the Template objects are equal. This method # does NOT normalize either Template before doing the comparison. # - # @param template [Object] The Template to compare. - # @return [TrueClass, FalseClass] true if the Templates are equivalent, false + # @param [Object] template The Template to compare. + # + # @return [TrueClass, FalseClass] + # true if the Templates are equivalent, false # otherwise. # # pkg:gem/addressable#lib/addressable/template.rb:274 def ==(template); end - # Returns true if the Template objects are equal. This method - # does NOT normalize either Template before doing the comparison. # Addressable::Template makes no distinction between `==` and `eql?`. # - # @param template [Object] The Template to compare. - # @return [TrueClass, FalseClass] true if the Templates are equivalent, false - # otherwise. # @see #== # # pkg:gem/addressable#lib/addressable/template.rb:283 @@ -207,6 +206,12 @@ class Addressable::Template # Expands a URI template into a full URI. # + # @param [Hash] mapping The mapping that corresponds to the pattern. + # @param [#validate, #transform] processor + # An optional processor object may be supplied. + # @param [Boolean] normalize_values + # Optional flag to enable/disable unicode normalization. Default: true + # # The object should respond to either the validate or # transform messages or both. Both the validate and # transform methods should take two parameters: name and @@ -219,99 +224,103 @@ class Addressable::Template # encoded automatically. Unicode normalization will be performed both # before and after sending the value to the transform method. # + # @return [Addressable::URI] The expanded URI template. + # # @example # class ExampleProcessor - # def self.validate(name, value) - # return !!(value =~ /^[\w ]+$/) if name == "query" - # return true - # end - # - # def self.transform(name, value) - # return value.gsub(/ /, "+") if name == "query" - # return value - # end + # def self.validate(name, value) + # return !!(value =~ /^[\w ]+$/) if name == "query" + # return true + # end + # + # def self.transform(name, value) + # return value.gsub(/ /, "+") if name == "query" + # return value + # end # end # # Addressable::Template.new( - # "http://example.com/search/{query}/" + # "http://example.com/search/{query}/" # ).expand( - # {"query" => "an example search query"}, - # ExampleProcessor + # {"query" => "an example search query"}, + # ExampleProcessor # ).to_str # #=> "http://example.com/search/an+example+search+query/" # # Addressable::Template.new( - # "http://example.com/search/{query}/" + # "http://example.com/search/{query}/" # ).expand( - # {"query" => "an example search query"} + # {"query" => "an example search query"} # ).to_str # #=> "http://example.com/search/an%20example%20search%20query/" # # Addressable::Template.new( - # "http://example.com/search/{query}/" + # "http://example.com/search/{query}/" # ).expand( - # {"query" => "bogus!"}, - # ExampleProcessor + # {"query" => "bogus!"}, + # ExampleProcessor # ).to_str # #=> Addressable::Template::InvalidTemplateValueError - # @param mapping [Hash] The mapping that corresponds to the pattern. - # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true - # @param processor [#validate, #transform] An optional processor object may be supplied. - # @return [Addressable::URI] The expanded URI template. # # pkg:gem/addressable#lib/addressable/template.rb:591 def expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end # Extracts a mapping from the URI using a URI Template pattern. # + # @param [Addressable::URI, #to_str] uri + # The URI to extract from. + # + # @param [#restore, #match] processor + # A template processor object may optionally be supplied. + # + # The object should respond to either the restore or + # match messages or both. The restore method should + # take two parameters: `[String] name` and `[String] value`. + # The restore method should reverse any transformations that + # have been performed on the value to ensure a valid URI. + # The match method should take a single + # parameter: `[String] name`. The match method should return + # a String containing a regular expression capture group for + # matching on that particular variable. The default value is `".*?"`. + # The match method has no effect on multivariate operator + # expansions. + # + # @return [Hash, NilClass] + # The Hash mapping that was extracted from the URI, or + # nil if the URI didn't match the template. + # # @example # class ExampleProcessor - # def self.restore(name, value) - # return value.gsub(/\+/, " ") if name == "query" - # return value - # end - # - # def self.match(name) - # return ".*?" if name == "first" - # return ".*" - # end + # def self.restore(name, value) + # return value.gsub(/\+/, " ") if name == "query" + # return value + # end + # + # def self.match(name) + # return ".*?" if name == "first" + # return ".*" + # end # end # # uri = Addressable::URI.parse( - # "http://example.com/search/an+example+search+query/" + # "http://example.com/search/an+example+search+query/" # ) # Addressable::Template.new( - # "http://example.com/search/{query}/" + # "http://example.com/search/{query}/" # ).extract(uri, ExampleProcessor) # #=> {"query" => "an example search query"} # # uri = Addressable::URI.parse("http://example.com/a/b/c/") # Addressable::Template.new( - # "http://example.com/{first}/{second}/" + # "http://example.com/{first}/{second}/" # ).extract(uri, ExampleProcessor) # #=> {"first" => "a", "second" => "b/c"} # # uri = Addressable::URI.parse("http://example.com/a/b/c/") # Addressable::Template.new( - # "http://example.com/{first}/{-list|/|second}/" + # "http://example.com/{first}/{-list|/|second}/" # ).extract(uri) # #=> {"first" => "a", "second" => ["b", "c"]} - # @param processor [#restore, #match] A template processor object may optionally be supplied. - # - # The object should respond to either the restore or - # match messages or both. The restore method should - # take two parameters: `[String] name` and `[String] value`. - # The restore method should reverse any transformations that - # have been performed on the value to ensure a valid URI. - # The match method should take a single - # parameter: `[String] name`. The match method should return - # a String containing a regular expression capture group for - # matching on that particular variable. The default value is `".*?"`. - # The match method has no effect on multivariate operator - # expansions. - # @param uri [Addressable::URI, #to_str] The URI to extract from. - # @return [Hash, NilClass] The Hash mapping that was extracted from the URI, or - # nil if the URI didn't match the template. # # pkg:gem/addressable#lib/addressable/template.rb:342 def extract(uri, processor = T.unsafe(nil)); end @@ -330,36 +339,51 @@ class Addressable::Template # pkg:gem/addressable#lib/addressable/template.rb:260 def inspect; end - # Returns an Array of variables used within the template pattern. - # The variables are listed in the Array in the order they appear within - # the pattern. Multiple occurrences of a variable within a pattern are - # not represented in this Array. - # - # @return [Array] The variables present in the template's pattern. - # # pkg:gem/addressable#lib/addressable/template.rb:610 def keys; end # Extracts match data from the URI using a URI Template pattern. # + # @param [Addressable::URI, #to_str] uri + # The URI to extract from. + # + # @param [#restore, #match] processor + # A template processor object may optionally be supplied. + # + # The object should respond to either the restore or + # match messages or both. The restore method should + # take two parameters: `[String] name` and `[String] value`. + # The restore method should reverse any transformations that + # have been performed on the value to ensure a valid URI. + # The match method should take a single + # parameter: `[String] name`. The match method should return + # a String containing a regular expression capture group for + # matching on that particular variable. The default value is `".*?"`. + # The match method has no effect on multivariate operator + # expansions. + # + # @return [Hash, NilClass] + # The Hash mapping that was extracted from the URI, or + # nil if the URI didn't match the template. + # # @example # class ExampleProcessor - # def self.restore(name, value) - # return value.gsub(/\+/, " ") if name == "query" - # return value - # end - # - # def self.match(name) - # return ".*?" if name == "first" - # return ".*" - # end + # def self.restore(name, value) + # return value.gsub(/\+/, " ") if name == "query" + # return value + # end + # + # def self.match(name) + # return ".*?" if name == "first" + # return ".*" + # end # end # # uri = Addressable::URI.parse( - # "http://example.com/search/an+example+search+query/" + # "http://example.com/search/an+example+search+query/" # ) # match = Addressable::Template.new( - # "http://example.com/search/{query}/" + # "http://example.com/search/{query}/" # ).match(uri, ExampleProcessor) # match.variables # #=> ["query"] @@ -368,7 +392,7 @@ class Addressable::Template # # uri = Addressable::URI.parse("http://example.com/a/b/c/") # match = Addressable::Template.new( - # "http://example.com/{first}/{+second}/" + # "http://example.com/{first}/{+second}/" # ).match(uri, ExampleProcessor) # match.variables # #=> ["first", "second"] @@ -377,52 +401,36 @@ class Addressable::Template # # uri = Addressable::URI.parse("http://example.com/a/b/c/") # match = Addressable::Template.new( - # "http://example.com/{first}{/second*}/" + # "http://example.com/{first}{/second*}/" # ).match(uri) # match.variables # #=> ["first", "second"] # match.captures # #=> ["a", ["b", "c"]] - # @param processor [#restore, #match] A template processor object may optionally be supplied. - # - # The object should respond to either the restore or - # match messages or both. The restore method should - # take two parameters: `[String] name` and `[String] value`. - # The restore method should reverse any transformations that - # have been performed on the value to ensure a valid URI. - # The match method should take a single - # parameter: `[String] name`. The match method should return - # a String containing a regular expression capture group for - # matching on that particular variable. The default value is `".*?"`. - # The match method has no effect on multivariate operator - # expansions. - # @param uri [Addressable::URI, #to_str] The URI to extract from. - # @return [Hash, NilClass] The Hash mapping that was extracted from the URI, or - # nil if the URI didn't match the template. # # pkg:gem/addressable#lib/addressable/template.rb:413 def match(uri, processor = T.unsafe(nil)); end # Returns the named captures of the coerced `Regexp`. # - # @api private # @return [Hash] The named captures of the `Regexp` given by {#to_regexp}. # + # @api private + # # pkg:gem/addressable#lib/addressable/template.rb:651 def named_captures; end - # Returns an Array of variables used within the template pattern. - # The variables are listed in the Array in the order they appear within - # the pattern. Multiple occurrences of a variable within a pattern are - # not represented in this Array. - # - # @return [Array] The variables present in the template's pattern. - # # pkg:gem/addressable#lib/addressable/template.rb:611 def names; end # Expands a URI template into another URI template. # + # @param [Hash] mapping The mapping that corresponds to the pattern. + # @param [#validate, #transform] processor + # An optional processor object may be supplied. + # @param [Boolean] normalize_values + # Optional flag to enable/disable unicode normalization. Default: true + # # The object should respond to either the validate or # transform messages or both. Both the validate and # transform methods should take two parameters: name and @@ -435,25 +443,23 @@ class Addressable::Template # encoded automatically. Unicode normalization will be performed both # before and after sending the value to the transform method. # + # @return [Addressable::Template] The partially expanded URI template. + # # @example # Addressable::Template.new( - # "http://example.com/{one}/{two}/" + # "http://example.com/{one}/{two}/" # ).partial_expand({"one" => "1"}).pattern # #=> "http://example.com/1/{two}/" # # Addressable::Template.new( - # "http://example.com/{?one,two}/" + # "http://example.com/{?one,two}/" # ).partial_expand({"one" => "1"}).pattern # #=> "http://example.com/?one=1{&two}/" # # Addressable::Template.new( - # "http://example.com/{?one,two,three}/" + # "http://example.com/{?one,two,three}/" # ).partial_expand({"one" => "1", "three" => 3}).pattern # #=> "http://example.com/?one=1{&two}&three=3" - # @param mapping [Hash] The mapping that corresponds to the pattern. - # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true - # @param processor [#validate, #transform] An optional processor object may be supplied. - # @return [Addressable::Template] The partially expanded URI template. # # pkg:gem/addressable#lib/addressable/template.rb:524 def partial_expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end @@ -465,9 +471,10 @@ class Addressable::Template # Returns the source of the coerced `Regexp`. # - # @api private # @return [String] The source of the `Regexp` given by {#to_regexp}. # + # @api private + # # pkg:gem/addressable#lib/addressable/template.rb:641 def source; end @@ -504,10 +511,12 @@ class Addressable::Template # Takes a set of values, and joins them together based on the # operator. # - # @param operator [String, Nil] One of the operators from the set + # @param [String, Nil] operator One of the operators from the set # (?,&,+,#,;,/,.), or nil if there wasn't one. - # @param return_value [Array] The set of return values (as [variable_name, value] tuples) that will + # @param [Array] return_value + # The set of return values (as [variable_name, value] tuples) that will # be joined together. + # # @return [String] The transformed mapped value # # pkg:gem/addressable#lib/addressable/template.rb:861 @@ -515,8 +524,10 @@ class Addressable::Template # Generates a hash with string keys # - # @param mapping [Hash] A mapping hash to normalize - # @return [Hash] A hash with stringified keys + # @param [Hash] mapping A mapping hash to normalize + # + # @return [Hash] + # A hash with stringified keys # # pkg:gem/addressable#lib/addressable/template.rb:924 def normalize_keys(mapping); end @@ -524,7 +535,9 @@ class Addressable::Template # Takes a set of values, and joins them together based on the # operator. # - # @param value [Hash, Array, String] Normalizes unicode keys and values with String#unicode_normalize (NFC) + # @param [Hash, Array, String] value + # Normalizes unicode keys and values with String#unicode_normalize (NFC) + # # @return [Hash, Array, String] The normalized values # # pkg:gem/addressable#lib/addressable/template.rb:898 @@ -535,9 +548,11 @@ class Addressable::Template # Generates the Regexp that parses a template pattern. # - # @param pattern [String] The URI template pattern. - # @param processor [#match] The template processor to use. - # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be + # @param [String] pattern The URI template pattern. + # @param [#match] processor The template processor to use. + # + # @return [Array, Regexp] + # An array of expansion variables nad a regular expression which may be # used to parse a template pattern # # pkg:gem/addressable#lib/addressable/template.rb:968 @@ -546,9 +561,11 @@ class Addressable::Template # Generates the Regexp that parses a template pattern. Memoizes the # value if template processor not set (processors may not be deterministic) # - # @param pattern [String] The URI template pattern. - # @param processor [#match] The template processor to use. - # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be + # @param [String] pattern The URI template pattern. + # @param [#match] processor The template processor to use. + # + # @return [Array, Regexp] + # An array of expansion variables nad a regular expression which may be # used to parse a template pattern # # pkg:gem/addressable#lib/addressable/template.rb:950 @@ -557,6 +574,15 @@ class Addressable::Template # Transforms a mapped value so that values can be substituted into the # template. # + # @param [Hash] mapping The mapping to replace captures + # @param [String] capture + # The expression to replace + # @param [#validate, #transform] processor + # An optional processor object may be supplied. + # @param [Boolean] normalize_values + # Optional flag to enable/disable unicode normalization. Default: true + # + # # The object should respond to either the validate or # transform messages or both. Both the validate and # transform methods should take two parameters: name and @@ -569,10 +595,6 @@ class Addressable::Template # automatically. Unicode normalization will be performed both before and # after sending the value to the transform method. # - # @param capture [String] The expression to replace - # @param mapping [Hash] The mapping to replace captures - # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true - # @param processor [#validate, #transform] An optional processor object may be supplied. # @return [String] The expanded expression # # pkg:gem/addressable#lib/addressable/template.rb:753 @@ -580,6 +602,15 @@ class Addressable::Template # Loops through each capture and expands any values available in mapping # + # @param [Hash] mapping + # Set of keys to expand + # @param [String] capture + # The expression to expand + # @param [#validate, #transform] processor + # An optional processor object may be supplied. + # @param [Boolean] normalize_values + # Optional flag to enable/disable unicode normalization. Default: true + # # The object should respond to either the validate or # transform messages or both. Both the validate and # transform methods should take two parameters: name and @@ -592,10 +623,6 @@ class Addressable::Template # automatically. Unicode normalization will be performed both before and # after sending the value to the transform method. # - # @param capture [String] The expression to expand - # @param mapping [Hash] Set of keys to expand - # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true - # @param processor [#validate, #transform] An optional processor object may be supplied. # @return [String] The expanded expression # # pkg:gem/addressable#lib/addressable/template.rb:694 @@ -629,20 +656,25 @@ class Addressable::Template::MatchData # Creates a new MatchData object. # MatchData objects should never be instantiated directly. # - # @param uri [Addressable::URI] The URI that the template was matched against. - # @return [MatchData] a new instance of MatchData + # @param [Addressable::URI] uri + # The URI that the template was matched against. # # pkg:gem/addressable#lib/addressable/template.rb:103 def initialize(uri, template, mapping); end # Accesses captured values by name or by index. # - # @param key [String, Symbol, Fixnum] Capture index or name. Note that when accessing by with index + # @param [String, Symbol, Fixnum] key + # Capture index or name. Note that when accessing by with index # of 0, the full URI will be returned. The intention is to mimic # the ::MatchData#[] behavior. - # @param len [#to_int, nil] If provided, an array of values will be returned with the given + # + # @param [#to_int, nil] len + # If provided, an array of values will be returned with the given # parameter used as length. - # @return [Array, String, nil] The captured value corresponding to the index or name. If the + # + # @return [Array, String, nil] + # The captured value corresponding to the index or name. If the # value was not provided or the key is unknown, nil will be # returned. # @@ -652,10 +684,6 @@ class Addressable::Template::MatchData # pkg:gem/addressable#lib/addressable/template.rb:170 def [](key, len = T.unsafe(nil)); end - # @return [Array] The list of values that were captured by the Template. - # Note that this list will include nils for any variables which - # were in the Template, but did not appear in the URI. - # # pkg:gem/addressable#lib/addressable/template.rb:149 def captures; end @@ -666,14 +694,11 @@ class Addressable::Template::MatchData # pkg:gem/addressable#lib/addressable/template.rb:213 def inspect; end - # @return [Array] The list of variables that were present in the Template. - # Note that this list will include variables which do not appear - # in the mapping because they were not present in URI. - # # pkg:gem/addressable#lib/addressable/template.rb:135 def keys; end - # @return [Hash] The mapping that resulted from the match. + # @return [Hash] + # The mapping that resulted from the match. # Note that this mapping does not include keys or values for # variables that appear in the Template, but are not present # in the URI. @@ -681,17 +706,9 @@ class Addressable::Template::MatchData # pkg:gem/addressable#lib/addressable/template.rb:125 def mapping; end - # @return [Array] The list of variables that were present in the Template. - # Note that this list will include variables which do not appear - # in the mapping because they were not present in URI. - # # pkg:gem/addressable#lib/addressable/template.rb:136 def names; end - # Dummy method for code expecting a ::MatchData instance - # - # @return [String] An empty string. - # # pkg:gem/addressable#lib/addressable/template.rb:225 def post_match; end @@ -702,33 +719,36 @@ class Addressable::Template::MatchData # pkg:gem/addressable#lib/addressable/template.rb:222 def pre_match; end - # @return [String] The matched URI as String. - # # pkg:gem/addressable#lib/addressable/template.rb:194 def string; end - # @return [Addressable::Template] The Template used for the match. + # @return [Addressable::Template] + # The Template used for the match. # # pkg:gem/addressable#lib/addressable/template.rb:117 def template; end - # @return [Array] Array with the matched URI as first element followed by the captured + # @return [Array] + # Array with the matched URI as first element followed by the captured # values. # # pkg:gem/addressable#lib/addressable/template.rb:184 def to_a; end - # @return [String] The matched URI as String. + # @return [String] + # The matched URI as String. # # pkg:gem/addressable#lib/addressable/template.rb:191 def to_s; end - # @return [Addressable::URI] The URI that the Template was matched against. + # @return [Addressable::URI] + # The URI that the Template was matched against. # # pkg:gem/addressable#lib/addressable/template.rb:112 def uri; end - # @return [Array] The list of values that were captured by the Template. + # @return [Array] + # The list of values that were captured by the Template. # Note that this list will include nils for any variables which # were in the Template, but did not appear in the URI. # @@ -737,14 +757,19 @@ class Addressable::Template::MatchData # Returns multiple captured values at once. # - # @param *indexes [String, Symbol, Fixnum] Indices of the captures to be returned - # @return [Array] Values corresponding to given indices. + # @param [String, Symbol, Fixnum] *indexes + # Indices of the captures to be returned + # + # @return [Array] + # Values corresponding to given indices. + # # @see Addressable::Template::MatchData#[] # # pkg:gem/addressable#lib/addressable/template.rb:205 def values_at(*indexes); end - # @return [Array] The list of variables that were present in the Template. + # @return [Array] + # The list of variables that were present in the Template. # Note that this list will include variables which do not appear # in the mapping because they were not present in URI. # @@ -780,35 +805,36 @@ Addressable::Template::VARSPEC = T.let(T.unsafe(nil), Regexp) class Addressable::URI # Creates a new uri object from component parts. # - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @option [String, - # @param [String, [Hash] a customizable set of options + # @option [String, #to_str] scheme The scheme component. + # @option [String, #to_str] user The user component. + # @option [String, #to_str] password The password component. + # @option [String, #to_str] userinfo + # The userinfo component. If this is supplied, the user and password + # components must be omitted. + # @option [String, #to_str] host The host component. + # @option [String, #to_str] port The port component. + # @option [String, #to_str] authority + # The authority component. If this is supplied, the user, password, + # userinfo, host, and port components must be omitted. + # @option [String, #to_str] path The path component. + # @option [String, #to_str] query The query component. + # @option [String, #to_str] fragment The fragment component. + # # @return [Addressable::URI] The constructed URI object. # # pkg:gem/addressable#lib/addressable/uri.rb:830 def initialize(options = T.unsafe(nil)); end - # Joins two URIs together. - # - # @param The [String, Addressable::URI, #to_str] URI to join with. - # @return [Addressable::URI] The joined URI. - # # pkg:gem/addressable#lib/addressable/uri.rb:1982 def +(uri); end # Returns true if the URI objects are equal. This method # normalizes both URIs before doing the comparison. # - # @param uri [Object] The URI to compare. - # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # @param [Object] uri The URI to compare. + # + # @return [TrueClass, FalseClass] + # true if the URIs are equivalent, false # otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:2239 @@ -818,8 +844,10 @@ class Addressable::URI # normalizes both URIs before doing the comparison, and allows comparison # against Strings. # - # @param uri [Object] The URI to compare. - # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # @param [Object] uri The URI to compare. + # + # @return [TrueClass, FalseClass] + # true if the URIs are equivalent, false # otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:2217 @@ -827,7 +855,8 @@ class Addressable::URI # Determines if the URI is absolute. # - # @return [TrueClass, FalseClass] true if the URI is absolute. false + # @return [TrueClass, FalseClass] + # true if the URI is absolute. false # otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:1879 @@ -843,7 +872,7 @@ class Addressable::URI # Sets the authority component for this URI. # - # @param new_authority [String, #to_str] The new authority component. + # @param [String, #to_str] new_authority The new authority component. # # pkg:gem/addressable#lib/addressable/uri.rb:1274 def authority=(new_authority); end @@ -869,7 +898,8 @@ class Addressable::URI # are valid. The URI will be revalidated as soon as the entire block has # been executed. # - # @param block [Proc] A set of operations to perform on a given URI. + # @param [Proc] block + # A set of operations to perform on a given URI. # # pkg:gem/addressable#lib/addressable/uri.rb:2396 def defer_validation; end @@ -901,7 +931,8 @@ class Addressable::URI # Determines if the URI is an empty string. # - # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. + # @return [TrueClass, FalseClass] + # Returns true if empty, false otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:2333 def empty?; end @@ -912,8 +943,10 @@ class Addressable::URI # Returns true if the URI objects are equal. This method # does NOT normalize either URI before doing the comparison. # - # @param uri [Object] The URI to compare. - # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # @param [Object] uri The URI to compare. + # + # @return [TrueClass, FalseClass] + # true if the URIs are equivalent, false # otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:2253 @@ -936,7 +969,7 @@ class Addressable::URI # Sets the fragment component for this URI. # - # @param new_fragment [String, #to_str] The new fragment component. + # @param [String, #to_str] new_fragment The new fragment component. # # pkg:gem/addressable#lib/addressable/uri.rb:1835 def fragment=(new_fragment); end @@ -965,7 +998,7 @@ class Addressable::URI # Sets the host component for this URI. # - # @param new_host [String, #to_str] The new host component. + # @param [String, #to_str] new_host The new host component. # # pkg:gem/addressable#lib/addressable/uri.rb:1156 def host=(new_host); end @@ -973,18 +1006,20 @@ class Addressable::URI # This method is same as URI::Generic#host except # brackets for IPv6 (and 'IPvFuture') addresses are removed. # - # @return [String] The hostname for this URI. # @see Addressable::URI#host # + # @return [String] The hostname for this URI. + # # pkg:gem/addressable#lib/addressable/uri.rb:1178 def hostname; end # This method is same as URI::Generic#host= except # the argument can be a bare IPv6 address (or 'IPvFuture'). # - # @param new_hostname [String, #to_str] The new hostname for this URI. # @see Addressable::URI#host= # + # @param [String, #to_str] new_hostname The new hostname for this URI. + # # pkg:gem/addressable#lib/addressable/uri.rb:1190 def hostname=(new_hostname); end @@ -1009,7 +1044,8 @@ class Addressable::URI # Determines if the scheme indicates an IP-based protocol. # - # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. + # @return [TrueClass, FalseClass] + # true if the scheme indicates an IP-based protocol. # false otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:1855 @@ -1017,7 +1053,8 @@ class Addressable::URI # Joins two URIs together. # - # @param The [String, Addressable::URI, #to_str] URI to join with. + # @param [String, Addressable::URI, #to_str] The URI to join with. + # # @return [Addressable::URI] The joined URI. # # pkg:gem/addressable#lib/addressable/uri.rb:1889 @@ -1025,8 +1062,10 @@ class Addressable::URI # Destructive form of join. # - # @param The [String, Addressable::URI, #to_str] URI to join with. + # @param [String, Addressable::URI, #to_str] The URI to join with. + # # @return [Addressable::URI] The joined URI. + # # @see Addressable::URI#join # # pkg:gem/addressable#lib/addressable/uri.rb:1992 @@ -1037,8 +1076,10 @@ class Addressable::URI # components present in the hash parameter will override the # original components. The path component is not treated specially. # - # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @param [Hash, Addressable::URI, #to_hash] The components to merge with. + # # @return [Addressable::URI] The merged URI. + # # @see Hash#merge # # pkg:gem/addressable#lib/addressable/uri.rb:2007 @@ -1046,8 +1087,10 @@ class Addressable::URI # Destructive form of merge. # - # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @param [Hash, Addressable::URI, #to_hash] The components to merge with. + # # @return [Addressable::URI] The merged URI. + # # @see Addressable::URI#merge # # pkg:gem/addressable#lib/addressable/uri.rb:2072 @@ -1069,6 +1112,7 @@ class Addressable::URI # Destructively normalizes this URI object. # # @return [Addressable::URI] The normalized URI. + # # @see Addressable::URI#normalize # # pkg:gem/addressable#lib/addressable/uri.rb:2190 @@ -1158,21 +1202,25 @@ class Addressable::URI # Omits components from a URI. # + # @param [Symbol] *components The components to be omitted. + # + # @return [Addressable::URI] The URI with components omitted. + # # @example # uri = Addressable::URI.parse("http://example.com/path?query") # #=> # # uri.omit(:scheme, :authority) # #=> # - # @param *components [Symbol] The components to be omitted. - # @return [Addressable::URI] The URI with components omitted. # # pkg:gem/addressable#lib/addressable/uri.rb:2297 def omit(*components); end # Destructive form of omit. # - # @param *components [Symbol] The components to be omitted. + # @param [Symbol] *components The components to be omitted. + # # @return [Addressable::URI] The URI with components omitted. + # # @see Addressable::URI#omit # # pkg:gem/addressable#lib/addressable/uri.rb:2324 @@ -1190,7 +1238,7 @@ class Addressable::URI # RFC 6454, section 6.2. This assignment will reset the `userinfo` # component. # - # @param new_origin [String, #to_str] The new origin component. + # @param [String, #to_str] new_origin The new origin component. # # pkg:gem/addressable#lib/addressable/uri.rb:1333 def origin=(new_origin); end @@ -1204,7 +1252,7 @@ class Addressable::URI # Sets the password component for this URI. # - # @param new_password [String, #to_str] The new password component. + # @param [String, #to_str] new_password The new password component. # # pkg:gem/addressable#lib/addressable/uri.rb:1025 def password=(new_password); end @@ -1218,7 +1266,7 @@ class Addressable::URI # Sets the path component for this URI. # - # @param new_path [String, #to_str] The new path component. + # @param [String, #to_str] new_path The new path component. # # pkg:gem/addressable#lib/addressable/uri.rb:1567 def path=(new_path); end @@ -1234,7 +1282,7 @@ class Addressable::URI # Sets the port component for this URI. # - # @param new_port [String, Integer, #to_s] The new port component. + # @param [String, Integer, #to_s] new_port The new port component. # # pkg:gem/addressable#lib/addressable/uri.rb:1408 def port=(new_port); end @@ -1248,13 +1296,19 @@ class Addressable::URI # Sets the query component for this URI. # - # @param new_query [String, #to_str] The new query component. + # @param [String, #to_str] new_query The new query component. # # pkg:gem/addressable#lib/addressable/uri.rb:1641 def query=(new_query); end # Converts the query component to a Hash value. # + # @param [Class] return_type The return type desired. Value must be either + # `Hash` or `Array`. + # + # @return [Hash, Array, nil] The query string parsed as a Hash or Array + # or nil if the query string is blank. + # # @example # Addressable::URI.parse("?one=1&two=2&three=3").query_values # #=> {"one" => "1", "two" => "2", "three" => "3"} @@ -1266,10 +1320,6 @@ class Addressable::URI # #=> {} # Addressable::URI.parse("").query_values # #=> nil - # @param return_type [Class] The return type desired. Value must be either - # `Hash` or `Array`. - # @return [Hash, Array, nil] The query string parsed as a Hash or Array - # or nil if the query string is blank. # # pkg:gem/addressable#lib/addressable/uri.rb:1672 def query_values(return_type = T.unsafe(nil)); end @@ -1277,6 +1327,8 @@ class Addressable::URI # Sets the query component for this URI from a Hash object. # An empty Hash or Array will result in an empty query string. # + # @param [Hash, #to_hash, Array] new_query_values The new query values. + # # @example # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} # uri.query @@ -1290,14 +1342,14 @@ class Addressable::URI # uri.query_values = [['flag'], ['key', 'value']] # uri.query # # => "flag&key=value" - # @param new_query_values [Hash, #to_hash, Array] The new query values. # # pkg:gem/addressable#lib/addressable/uri.rb:1723 def query_values=(new_query_values); end # Determines if the URI is relative. # - # @return [TrueClass, FalseClass] true if the URI is relative. false + # @return [TrueClass, FalseClass] + # true if the URI is relative. false # otherwise. # # pkg:gem/addressable#lib/addressable/uri.rb:1869 @@ -1313,7 +1365,7 @@ class Addressable::URI # Sets the HTTP request URI for this URI. # - # @param new_request_uri [String, #to_str] The new HTTP request URI. + # @param [String, #to_str] new_request_uri The new HTTP request URI. # # pkg:gem/addressable#lib/addressable/uri.rb:1786 def request_uri=(new_request_uri); end @@ -1322,8 +1374,10 @@ class Addressable::URI # supplied URI as a base for resolution. Returns an absolute URI if # necessary. This is effectively the opposite of route_to. # - # @param uri [String, Addressable::URI, #to_str] The URI to route from. - # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. + # @param [String, Addressable::URI, #to_str] uri The URI to route from. + # + # @return [Addressable::URI] + # The normalized relative URI that is equivalent to the original URI. # # pkg:gem/addressable#lib/addressable/uri.rb:2085 def route_from(uri); end @@ -1332,8 +1386,10 @@ class Addressable::URI # uses this URI as a base for resolution. Returns an absolute URI if # necessary. This is effectively the opposite of route_from. # - # @param uri [String, Addressable::URI, #to_str] The URI to route to. - # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. + # @param [String, Addressable::URI, #to_str] uri The URI to route to. + # + # @return [Addressable::URI] + # The normalized relative URI that is equivalent to the supplied URI. # # pkg:gem/addressable#lib/addressable/uri.rb:2150 def route_to(uri); end @@ -1347,7 +1403,7 @@ class Addressable::URI # Sets the scheme component for this URI. # - # @param new_scheme [String, #to_str] The new scheme component. + # @param [String, #to_str] new_scheme The new scheme component. # # pkg:gem/addressable#lib/addressable/uri.rb:917 def scheme=(new_scheme); end @@ -1366,7 +1422,7 @@ class Addressable::URI # Sets the site value for this URI. # - # @param new_site [String, #to_str] The new site value. + # @param [String, #to_str] new_site The new site value. # # pkg:gem/addressable#lib/addressable/uri.rb:1506 def site=(new_site); end @@ -1381,7 +1437,7 @@ class Addressable::URI # Sets the top-level domain for this URI. # - # @param new_tld [String, #to_str] The new top-level domain. + # @param [String, #to_str] new_tld The new top-level domain. # # pkg:gem/addressable#lib/addressable/uri.rb:1215 def tld=(new_tld); end @@ -1400,11 +1456,8 @@ class Addressable::URI # pkg:gem/addressable#lib/addressable/uri.rb:2341 def to_s; end - # Converts the URI to a String. # URI's are glorified Strings. Allow implicit conversion. # - # @return [String] The URI's String representation. - # # pkg:gem/addressable#lib/addressable/uri.rb:2361 def to_str; end @@ -1417,7 +1470,7 @@ class Addressable::URI # Sets the user component for this URI. # - # @param new_user [String, #to_str] The new user component. + # @param [String, #to_str] new_user The new user component. # # pkg:gem/addressable#lib/addressable/uri.rb:970 def user=(new_user); end @@ -1432,7 +1485,7 @@ class Addressable::URI # Sets the userinfo component for this URI. # - # @param new_userinfo [String, #to_str] The new userinfo component. + # @param [String, #to_str] new_userinfo The new userinfo component. # # pkg:gem/addressable#lib/addressable/uri.rb:1091 def userinfo=(new_userinfo); end @@ -1456,7 +1509,8 @@ class Addressable::URI # Replaces the internal state of self with the specified URI's state. # Used in destructive operations to avoid massive code repetition. # - # @param uri [Addressable::URI] The URI to replace self with. + # @param [Addressable::URI] uri The URI to replace self with. + # # @return [Addressable::URI] self. # # pkg:gem/addressable#lib/addressable/uri.rb:2519 @@ -1466,7 +1520,8 @@ class Addressable::URI # It is considered that there is empty string after last slash when # path ends with slash. # - # @param path [String] The path to split. + # @param [String] path The path to split. + # # @return [Array] An array of parts of path. # # pkg:gem/addressable#lib/addressable/uri.rb:2542 @@ -1493,6 +1548,15 @@ class Addressable::URI # parsed with Addressable::URI.parse. Handles all of the # various Microsoft-specific formats for specifying paths. # + # @param [String, Addressable::URI, #to_str] path + # Typically a String path to a file or directory, but + # will return a sensible return value if an absolute URI is supplied + # instead. + # + # @return [Addressable::URI] + # The parsed file scheme URI or the original URI if some other URI + # scheme was provided. + # # @example # base = Addressable::URI.convert_path("/absolute/path/") # uri = Addressable::URI.convert_path("relative/path") @@ -1500,29 +1564,29 @@ class Addressable::URI # #=> "file:///absolute/path/relative/path" # # Addressable::URI.convert_path( - # "c:\\windows\\My Documents 100%20\\foo.txt" + # "c:\\windows\\My Documents 100%20\\foo.txt" # ).to_s # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" # # Addressable::URI.convert_path("http://example.com/").to_s # #=> "http://example.com/" - # @param path [String, Addressable::URI, #to_str] Typically a String path to a file or directory, but - # will return a sensible return value if an absolute URI is supplied - # instead. - # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI - # scheme was provided. # # pkg:gem/addressable#lib/addressable/uri.rb:292 def convert_path(path); end # Percent encodes any special characters in the URI. # - # @param return_type [Class] The type of object to return. + # @param [String, Addressable::URI, #to_str] uri + # The URI to encode. + # + # @param [Class] return_type + # The type of object to return. # This value may only be set to String or # Addressable::URI. All other values are invalid. Defaults # to String. - # @param uri [String, Addressable::URI, #to_str] The URI to encode. - # @return [String, Addressable::URI] The encoded URI. + # + # @return [String, Addressable::URI] + # The encoded URI. # The return type is determined by the return_type # parameter. # @@ -1531,6 +1595,14 @@ class Addressable::URI # Percent encodes a URI component. # + # @param [String, #to_str] component The URI component to encode. + # + # @param [String, Regexp] character_class + # The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through # '9' to be percent encoded. If a Regexp is passed, the # value /[^b-zB-Z0-9]/ would have the same effect. A set of # useful String values may be found in the @@ -1538,84 +1610,45 @@ class Addressable::URI # value is the reserved plus unreserved character classes specified in # RFC 3986. # + # @param [Regexp] upcase_encoded + # A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # + # @return [String] The encoded component. + # # @example # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") # => "simple%2Fex%61mple" # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) # => "simple%2Fex%61mple" # Addressable::URI.encode_component( - # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED # ) # => "simple%2Fexample" - # @param character_class [String, Regexp] The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' through - # @param component [String, #to_str] The URI component to encode. - # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose - # encodings should be upcased. This allows normalization of percent - # encodings for characters not included in the - # character_class. - # @return [String] The encoded component. # # pkg:gem/addressable#lib/addressable/uri.rb:403 def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end - # Percent encodes any special characters in the URI. - # - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param uri [String, Addressable::URI, #to_str] The URI to encode. - # @return [String, Addressable::URI] The encoded URI. - # The return type is determined by the return_type - # parameter. - # # pkg:gem/addressable#lib/addressable/uri.rb:651 def escape(uri, return_type = T.unsafe(nil)); end - # Percent encodes a URI component. - # - # '9' to be percent encoded. If a Regexp is passed, the - # value /[^b-zB-Z0-9]/ would have the same effect. A set of - # useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @example - # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component( - # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # @param character_class [String, Regexp] The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' through - # @param component [String, #to_str] The URI component to encode. - # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose - # encodings should be upcased. This allows normalization of percent - # encodings for characters not included in the - # character_class. - # @return [String] The encoded component. - # # pkg:gem/addressable#lib/addressable/uri.rb:446 def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Encodes a set of key/value pairs according to the rules for the # application/x-www-form-urlencoded MIME type. # - # @param form_values [#to_hash, #to_ary] The form values to encode. - # @param sort [TrueClass, FalseClass] Sort the key/value pairs prior to encoding. + # @param [#to_hash, #to_ary] form_values + # The form values to encode. + # + # @param [TrueClass, FalseClass] sort + # Sort the key/value pairs prior to encoding. # Defaults to false. - # @return [String] The encoded value. + # + # @return [String] + # The encoded value. # # pkg:gem/addressable#lib/addressable/uri.rb:740 def form_encode(form_values, sort = T.unsafe(nil)); end @@ -1623,8 +1656,11 @@ class Addressable::URI # Decodes a String according to the rules for the # application/x-www-form-urlencoded MIME type. # - # @param encoded_value [String, #to_str] The form values to decode. - # @return [Array] The decoded values. + # @param [String, #to_str] encoded_value + # The form values to decode. + # + # @return [Array] + # The decoded values. # This is not a Hash because of the possibility for # duplicate keys. # @@ -1635,11 +1671,14 @@ class Addressable::URI # URI — the method will use heuristics to guess what URI was intended. # This is not standards-compliant, merely user-friendly. # - # @param hints [Hash] A Hash of hints to the heuristic parser. - # Defaults to {:scheme => "http"}. - # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # @param [String, Addressable::URI, #to_str] uri + # The URI string to parse. # No parsing is performed if the object is already an # Addressable::URI. + # @param [Hash] hints + # A Hash of hints to the heuristic parser. + # Defaults to {:scheme => "http"}. + # # @return [Addressable::URI] The parsed URI. # # pkg:gem/addressable#lib/addressable/uri.rb:191 @@ -1654,38 +1693,26 @@ class Addressable::URI # Joins several URIs together. # + # @param [String, Addressable::URI, #to_str] *uris + # The URIs to join. + # + # @return [Addressable::URI] The joined URI. + # # @example # base = "http://example.com/" # uri = Addressable::URI.parse("relative/path") # Addressable::URI.join(base, uri) # #=> # - # @param *uris [String, Addressable::URI, #to_str] The URIs to join. - # @return [Addressable::URI] The joined URI. # # pkg:gem/addressable#lib/addressable/uri.rb:343 def join(*uris); end # Normalizes the encoding of a URI component. # - # @example - # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", /[^b-zB-Z]/ - # ) - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", - # Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # Addressable::URI.normalize_component( - # "one%20two%2fthree%26four", - # "0-9a-zA-Z &/", - # "/" - # ) - # => "one two%2Fthree&four" - # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # @param [String, #to_str] component The URI component to encode. + # + # @param [String, Regexp] character_class + # The characters which are not percent encoded. If a String # is passed, the String must be formatted as a regular # expression character class. (Do not include the surrounding square # brackets.) For example, "b-zB-Z0-9" would cause @@ -1696,20 +1723,42 @@ class Addressable::URI # Addressable::URI::CharacterClasses module. The default # value is the reserved plus unreserved character classes specified in # RFC 3986. - # @param component [String, #to_str] The URI component to encode. - # @param leave_encoded [String] When character_class is a String then + # + # @param [String] leave_encoded + # When character_class is a String then # leave_encoded is a string of characters that should remain # percent encoded while normalizing the component; if they appear percent # encoded in the original component, then they will be upcased ("%2f" # normalized to "%2F") but otherwise left alone. + # # @return [String] The normalized component. # + # @example + # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", /[^b-zB-Z]/ + # ) + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", + # Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # Addressable::URI.normalize_component( + # "one%20two%2fthree%26four", + # "0-9a-zA-Z &/", + # "/" + # ) + # => "one two%2Fthree&four" + # # pkg:gem/addressable#lib/addressable/uri.rb:552 def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Resolves paths to their simplest form. # - # @param path [String] The path to normalize. + # @param [String] path The path to normalize. + # # @return [String] The normalized path. # # pkg:gem/addressable#lib/addressable/uri.rb:2440 @@ -1718,12 +1767,17 @@ class Addressable::URI # Normalizes the encoding of a URI. Characters within a hostname are # not percent encoded to allow for internationalized domain names. # - # @param return_type [Class] The type of object to return. + # @param [String, Addressable::URI, #to_str] uri + # The URI to encode. + # + # @param [Class] return_type + # The type of object to return. # This value may only be set to String or # Addressable::URI. All other values are invalid. Defaults # to String. - # @param uri [String, Addressable::URI, #to_str] The URI to encode. - # @return [String, Addressable::URI] The encoded URI. + # + # @return [String, Addressable::URI] + # The encoded URI. # The return type is determined by the return_type # parameter. # @@ -1732,9 +1786,11 @@ class Addressable::URI # Returns a URI object based on the parsed string. # - # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # @param [String, Addressable::URI, #to_str] uri + # The URI string to parse. # No parsing is performed if the object is already an # Addressable::URI. + # # @return [Addressable::URI] The parsed URI. # # pkg:gem/addressable#lib/addressable/uri.rb:114 @@ -1752,74 +1808,33 @@ class Addressable::URI # however, it is recommended to use the unencode_component # alias when unencoding components. # - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @param return_type [Class] The type of object to return. + # @param [String, Addressable::URI, #to_str] uri + # The URI or component to unencode. + # + # @param [Class] return_type + # The type of object to return. # This value may only be set to String or # Addressable::URI. All other values are invalid. Defaults # to String. - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @return [String, Addressable::URI] The unencoded component or URI. + # + # @param [String] leave_encoded + # A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # + # @return [String, Addressable::URI] + # The unencoded component or URI. # The return type is determined by the return_type # parameter. # # pkg:gem/addressable#lib/addressable/uri.rb:472 def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # # pkg:gem/addressable#lib/addressable/uri.rb:502 def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # # pkg:gem/addressable#lib/addressable/uri.rb:501 def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # @param return_type [Class] The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. - # @return [String, Addressable::URI] The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - # # pkg:gem/addressable#lib/addressable/uri.rb:503 def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/ansi@1.5.0.rbi b/sorbet/rbi/gems/ansi@1.5.0.rbi index 77c17582a..e6f23bdf7 100644 --- a/sorbet/rbi/gems/ansi@1.5.0.rbi +++ b/sorbet/rbi/gems/ansi@1.5.0.rbi @@ -50,15 +50,16 @@ module ANSI::Code # # @example # ansi("Valentine", :red, :on_white) + # # @example # ansi(:red, :on_white){ "Valentine" } - # @return [String] String wrapped ANSI code. + # + # @return [String] + # String wrapped ANSI code. # # pkg:gem/ansi#lib/ansi/code.rb:176 def ansi(*codes); end - # Move cursor left a specified number of spaces. - # # pkg:gem/ansi#lib/ansi/code.rb:152 def back(spaces = T.unsafe(nil)); end @@ -114,22 +115,17 @@ module ANSI::Code # Also resolves :random and :on_random. # # @param codes [Array :$foo - # p value # => (integer 1) - # - # @return [Array] - # # pkg:gem/ast#lib/ast/node.rb:57 def to_a; end @@ -194,17 +164,12 @@ class AST::Node # pkg:gem/ast#lib/ast/node.rb:229 def to_ast; end - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # # pkg:gem/ast#lib/ast/node.rb:204 def to_s(indent = T.unsafe(nil)); end # Converts `self` to a pretty-printed s-expression. # - # @param indent [Integer] Base indentation level. + # @param [Integer] indent Base indentation level. # @return [String] # # pkg:gem/ast#lib/ast/node.rb:187 @@ -219,7 +184,6 @@ class AST::Node def to_sexp_array; end # Returns the type of this node. - # # @return [Symbol] # # pkg:gem/ast#lib/ast/node.rb:43 @@ -234,9 +198,9 @@ class AST::Node # # If the resulting node would be identical to `self`, does nothing. # - # @param children [Array, nil] - # @param properties [Hash, nil] - # @param type [Symbol, nil] + # @param [Symbol, nil] type + # @param [Array, nil] children + # @param [Hash, nil] properties # @return [AST::Node] # # pkg:gem/ast#lib/ast/node.rb:133 @@ -524,7 +488,7 @@ end module AST::Processor::Mixin # Default handler. Does nothing. # - # @param node [AST::Node] + # @param [AST::Node] node # @return [AST::Node, nil] # # pkg:gem/ast#lib/ast/processor/mixin.rb:284 @@ -538,7 +502,7 @@ module AST::Processor::Mixin # If the handler returns `nil`, `node` is returned; otherwise, # the return value of the handler is passed along. # - # @param node [AST::Node, nil] + # @param [AST::Node, nil] node # @return [AST::Node, nil] # # pkg:gem/ast#lib/ast/processor/mixin.rb:251 @@ -547,7 +511,7 @@ module AST::Processor::Mixin # {#process}es each node from `nodes` and returns an array of # results. # - # @param nodes [Array] + # @param [Array] nodes # @return [Array] # # pkg:gem/ast#lib/ast/processor/mixin.rb:274 diff --git a/sorbet/rbi/gems/bcrypt@3.1.21.rbi b/sorbet/rbi/gems/bcrypt@3.1.21.rbi index 31fb648c2..9ce7fd2f3 100644 --- a/sorbet/rbi/gems/bcrypt@3.1.21.rbi +++ b/sorbet/rbi/gems/bcrypt@3.1.21.rbi @@ -13,7 +13,7 @@ module BCrypt; end # A Ruby wrapper for the bcrypt() C extension calls and the Java calls. # -# pkg:gem/bcrypt#lib/bcrypt.rb:12 +# pkg:gem/bcrypt#lib/bcrypt/engine.rb:3 class BCrypt::Engine class << self # Autodetects the cost from the salt string. @@ -73,24 +73,17 @@ class BCrypt::Engine # Returns true if +salt+ is a valid bcrypt() salt, false if not. # - # @return [Boolean] - # # pkg:gem/bcrypt#lib/bcrypt/engine.rb:98 def valid_salt?(salt); end # Returns true if +secret+ is a valid bcrypt() secret, false if not. # - # @return [Boolean] - # # pkg:gem/bcrypt#lib/bcrypt/engine.rb:103 def valid_secret?(secret); end private - # pkg:gem/bcrypt#lib/bcrypt.rb:12 def __bc_crypt(_arg0, _arg1); end - - # pkg:gem/bcrypt#lib/bcrypt.rb:12 def __bc_salt(_arg0, _arg1, _arg2); end end end @@ -177,8 +170,6 @@ class BCrypt::Errors::InvalidSecret < ::BCrypt::Error; end class BCrypt::Password < ::String # Initializes a BCrypt::Password instance with the data from a stored hash. # - # @return [Password] a new instance of Password - # # pkg:gem/bcrypt#lib/bcrypt/password.rb:55 def initialize(raw_hash); end @@ -210,21 +201,6 @@ class BCrypt::Password < ::String # pkg:gem/bcrypt#lib/bcrypt/password.rb:31 def cost; end - # Compares a potential secret against the hash. Returns true if the secret is the original secret, false otherwise. - # - # Comparison edge case/gotcha: - # - # secret = "my secret" - # @password = BCrypt::Password.create(secret) - # - # @password == secret # => True - # @password == @password # => False - # @password == @password.to_s # => False - # @password.to_s == @password # => True - # @password.to_s == @password.to_s # => True - # - # secret == @password # => probably False, because the secret is not a BCrypt::Password instance. - # # pkg:gem/bcrypt#lib/bcrypt/password.rb:88 def is_password?(secret); end @@ -250,8 +226,6 @@ class BCrypt::Password < ::String # Returns true if +h+ is a valid hash. # - # @return [Boolean] - # # pkg:gem/bcrypt#lib/bcrypt/password.rb:93 def valid_hash?(h); end @@ -266,13 +240,9 @@ class BCrypt::Password < ::String # # @password = BCrypt::Password.create("my secret", :cost => 13) # - # @raise [ArgumentError] - # # pkg:gem/bcrypt#lib/bcrypt/password.rb:43 def create(secret, options = T.unsafe(nil)); end - # @return [Boolean] - # # pkg:gem/bcrypt#lib/bcrypt/password.rb:49 def valid_hash?(h); end end diff --git a/sorbet/rbi/gems/benchmark@0.5.0.rbi b/sorbet/rbi/gems/benchmark@0.5.0.rbi index ade93cc83..1c75f8e13 100644 --- a/sorbet/rbi/gems/benchmark@0.5.0.rbi +++ b/sorbet/rbi/gems/benchmark@0.5.0.rbi @@ -415,15 +415,11 @@ class Benchmark::Job # +width+ is a initial value for the label offset used in formatting; # the #bmbm method passes its +width+ argument to this constructor. # - # @return [Job] a new instance of Job - # # pkg:gem/benchmark#lib/benchmark.rb:355 def initialize(width); end # Registers the given label and block pair in the job list. # - # @raise [ArgumentError] - # # pkg:gem/benchmark#lib/benchmark.rb:363 def item(label = T.unsafe(nil), &blk); end @@ -432,10 +428,6 @@ class Benchmark::Job # pkg:gem/benchmark#lib/benchmark.rb:375 def list; end - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # # pkg:gem/benchmark#lib/benchmark.rb:372 def report(label = T.unsafe(nil), &blk); end @@ -456,8 +448,6 @@ class Benchmark::Report # +width+ and +format+ are the label offset and # format string used by Tms#format. # - # @return [Report] a new instance of Report - # # pkg:gem/benchmark#lib/benchmark.rb:393 def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end @@ -478,10 +468,6 @@ class Benchmark::Report # pkg:gem/benchmark#lib/benchmark.rb:412 def list; end - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # # pkg:gem/benchmark#lib/benchmark.rb:409 def report(label = T.unsafe(nil), *format, &blk); end @@ -501,8 +487,6 @@ class Benchmark::Tms # +cutime+ as the children's user CPU time, +cstime+ as the children's # system CPU time, +real+ as the elapsed real time and +label+ as the label. # - # @return [Tms] a new instance of Tms - # # pkg:gem/benchmark#lib/benchmark.rb:456 def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi b/sorbet/rbi/gems/bigdecimal@4.0.1.rbi index f329cce16..d7736e9db 100644 --- a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi +++ b/sorbet/rbi/gems/bigdecimal@4.0.1.rbi @@ -5,15 +5,9 @@ # Please instead update this file by running `bin/tapioca gem bigdecimal`. -# pkg:gem/bigdecimal#lib/bigdecimal.rb:10 +# pkg:gem/bigdecimal#lib/bigdecimal.rb:13 class BigDecimal < ::Numeric - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def %(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def *(_arg0); end - - # call-seq: + # call-seq: # self ** other -> bigdecimal # # Returns the \BigDecimal value of +self+ raised to power +other+: @@ -28,114 +22,6 @@ class BigDecimal < ::Numeric # pkg:gem/bigdecimal#lib/bigdecimal.rb:77 def **(y); end - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def +(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def +@; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def -(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def -@; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def /(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def <(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def <=(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def <=>(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def ==(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def ===(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def >(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def >=(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def _decimal_shift(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def _dump(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def abs; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def add(_arg0, _arg1); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def ceil(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def clone; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def coerce(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def div(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def divmod(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def dup; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def eql?(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def exponent; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def finite?; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def fix; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def floor(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def frac; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def hash; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def infinite?; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def inspect; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def modulo(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def mult(_arg0, _arg1); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def n_significant_digits; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def nan?; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def nonzero?; end - # call-seq: # power(n) # power(n, prec) @@ -147,42 +33,13 @@ class BigDecimal < ::Numeric # pkg:gem/bigdecimal#lib/bigdecimal.rb:97 def power(y, prec = T.unsafe(nil)); end - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def precision; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def precision_scale; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def quo(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def remainder(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def round(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def scale; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def sign; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def split; end - # Returns the square root of the value. # # Result has at least prec significant digits. # - # @raise [FloatDomainError] - # # pkg:gem/bigdecimal#lib/bigdecimal.rb:212 def sqrt(prec); end - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def sub(_arg0, _arg1); end - # call-seq: # a.to_d -> bigdecimal # @@ -209,53 +66,6 @@ class BigDecimal < ::Numeric # # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:90 def to_digits; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_f; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_i; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_int; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_r; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_s(format = T.unsafe(nil)); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def truncate(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def zero?; end - - class << self - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def _load(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def double_fig; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def interpret_loosely(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def limit(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def mode(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def save_exception_mode; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def save_limit; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def save_rounding_mode; end - end end # pkg:gem/bigdecimal#lib/bigdecimal.rb:14 @@ -264,8 +74,6 @@ module BigDecimal::Internal # Coerce x to BigDecimal with the specified precision. # TODO: some methods (example: BigMath.exp) require more precision than specified to coerce. # - # @raise [ArgumentError] - # # pkg:gem/bigdecimal#lib/bigdecimal.rb:18 def coerce_to_bigdecimal(x, prec, method_name); end @@ -285,6 +93,53 @@ BigDecimal::VERSION = T.let(T.unsafe(nil), String) # Core BigMath methods for BigDecimal (log, exp) are defined here. # Other methods (sin, cos, atan) are defined in 'bigdecimal/math.rb'. # +# -- +# Contents: +# sqrt(x, prec) +# cbrt(x, prec) +# hypot(x, y, prec) +# sin (x, prec) +# cos (x, prec) +# tan (x, prec) +# asin(x, prec) +# acos(x, prec) +# atan(x, prec) +# atan2(y, x, prec) +# sinh (x, prec) +# cosh (x, prec) +# tanh (x, prec) +# asinh(x, prec) +# acosh(x, prec) +# atanh(x, prec) +# log2 (x, prec) +# log10(x, prec) +# log1p(x, prec) +# expm1(x, prec) +# erf (x, prec) +# erfc(x, prec) +# gamma(x, prec) +# lgamma(x, prec) +# frexp(x) +# ldexp(x, exponent) +# PI (prec) +# E (prec) == exp(1.0,prec) +# +# where: +# x, y ... BigDecimal number to be computed. +# prec ... Number of digits to be obtained. +# ++ +# +# Provides mathematical functions. +# +# Example: +# +# require "bigdecimal/math" +# +# include BigMath +# +# a = BigDecimal((PI(49)/2).to_s) +# puts sin(a,100) # => 0.9999999999...9999999986e0 +# # pkg:gem/bigdecimal#lib/bigdecimal.rb:240 module BigMath private @@ -346,8 +201,6 @@ module BigMath # # If +decimal+ is NaN, returns NaN. # - # @raise [Math::DomainError] - # # pkg:gem/bigdecimal#lib/bigdecimal.rb:255 def log(x, prec); end diff --git a/sorbet/rbi/gems/builder@3.3.0.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi index d9650201b..b83a45241 100644 --- a/sorbet/rbi/gems/builder@3.3.0.rbi +++ b/sorbet/rbi/gems/builder@3.3.0.rbi @@ -8,6 +8,8 @@ # If the Builder::XChar module is not currently defined, fail on any # name clashes in standard library classes. # +# !/usr/bin/env ruby +# # pkg:gem/builder#lib/builder/xmlbase.rb:4 module Builder class << self @@ -21,6 +23,9 @@ end # pkg:gem/builder#lib/builder/xmlbase.rb:7 class Builder::IllegalBlockError < ::RuntimeError; end +# XML Character converter, from Sam Ruby: +# (see http://intertwingly.net/stories/2005/09/28/xchar.rb). +# # pkg:gem/builder#lib/builder/xchar.rb:33 module Builder::XChar class << self @@ -96,8 +101,6 @@ class Builder::XmlBase < ::BasicObject # characters aren't converted to character entities in # the output stream. # - # @return [XmlBase] a new instance of XmlBase - # # pkg:gem/builder#lib/builder/xmlbase.rb:27 def initialize(indent = T.unsafe(nil), initial = T.unsafe(nil), encoding = T.unsafe(nil)); end @@ -118,8 +121,6 @@ class Builder::XmlBase < ::BasicObject # pkg:gem/builder#lib/builder/xmlbase.rb:116 def <<(text); end - # @return [Boolean] - # # pkg:gem/builder#lib/builder/xmlbase.rb:33 def explicit_nil_handling?; end @@ -137,8 +138,6 @@ class Builder::XmlBase < ::BasicObject # cargo cult programming, # cf. http://fishbowl.pastiche.org/2004/10/13/cargo_cult_programming). # - # @return [Boolean] - # # pkg:gem/builder#lib/builder/xmlbase.rb:126 def nil?; end @@ -185,15 +184,9 @@ class Builder::XmlBase < ::BasicObject def cache_method_call(sym); end class << self - # Returns the value of attribute cache_method_calls. - # # pkg:gem/builder#lib/builder/xmlbase.rb:14 def cache_method_calls; end - # Sets the attribute cache_method_calls - # - # @param value the value to set the attribute cache_method_calls to. - # # pkg:gem/builder#lib/builder/xmlbase.rb:14 def cache_method_calls=(_arg0); end end @@ -414,8 +407,6 @@ class Builder::XmlMarkup < ::Builder::XmlBase # values), then give the value as a Symbol. This allows much # finer control over escaping attribute values. # - # @return [XmlMarkup] a new instance of XmlMarkup - # # pkg:gem/builder#lib/builder/xmlmarkup.rb:190 def initialize(options = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/cityhash@0.9.0.rbi b/sorbet/rbi/gems/cityhash@0.9.0.rbi index 609c95276..736a410f2 100644 --- a/sorbet/rbi/gems/cityhash@0.9.0.rbi +++ b/sorbet/rbi/gems/cityhash@0.9.0.rbi @@ -28,25 +28,13 @@ end # pkg:gem/cityhash#lib/cityhash.rb:6 CityHash::HIGH64_MASK = T.let(T.unsafe(nil), Integer) -# pkg:gem/cityhash#lib/cityhash.rb:2 module CityHash::Internal class << self - # pkg:gem/cityhash#lib/cityhash.rb:2 def hash128(_arg0); end - - # pkg:gem/cityhash#lib/cityhash.rb:2 def hash128_with_seed(_arg0, _arg1); end - - # pkg:gem/cityhash#lib/cityhash.rb:2 def hash32(_arg0); end - - # pkg:gem/cityhash#lib/cityhash.rb:2 def hash64(_arg0); end - - # pkg:gem/cityhash#lib/cityhash.rb:2 def hash64_with_seed(_arg0, _arg1); end - - # pkg:gem/cityhash#lib/cityhash.rb:2 def hash64_with_seeds(_arg0, _arg1, _arg2); end end end diff --git a/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi index f78c31683..fc0ae3aff 100644 --- a/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi +++ b/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi @@ -6,6 +6,8 @@ # {include:file:README.md} +# load native parts first +# load native parts first # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/constants.rb:1 module Concurrent @@ -18,8 +20,6 @@ module Concurrent # Abort a currently running transaction - see `Concurrent::atomically`. # - # @raise [Transaction::AbortError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:139 def abort_transaction; end @@ -50,30 +50,30 @@ module Concurrent # b = new TVar(100) # # Concurrent::atomically do - # a.value -= 10 - # b.value += 10 + # a.value -= 10 + # b.value += 10 # end - # @raise [ArgumentError] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:82 def atomically; end - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:56 def call_dataflow(method, executor, *inputs, &block); end # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. # {include:file:docs-source/dataflow.md} # - # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon - # @raise [ArgumentError] if no block is given - # @raise [ArgumentError] if any of the inputs are not `IVar`s - # @return [Object] the result of all the operations + # @param [Future] inputs zero or more `Future` operations that this dataflow depends upon + # # @yield The operation to perform once all the dependencies are met - # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldparam [Future] inputs each of the `Future` inputs to the dataflow # @yieldreturn [Object] the result of the block operation # + # @return [Object] the result of all the operations + # + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:34 def dataflow(*inputs, &block); end @@ -88,18 +88,21 @@ module Concurrent # Leave a transaction without committing or aborting - see `Concurrent::atomically`. # - # @raise [Transaction::LeaveError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:144 def leave_transaction; end - # Returns the current time as tracked by the application monotonic clock. + # @!macro monotonic_get_time # - # @param unit [Symbol] the time unit to be returned, can be either - # :float_second, :float_millisecond, :float_microsecond, :second, - # :millisecond, :microsecond, or :nanosecond default to :float_second. - # @return [Float] The current monotonic time since some unspecified - # starting point + # Returns the current time as tracked by the application monotonic clock. + # + # @param [Symbol] unit the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # @!macro monotonic_clock_warning # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/monotonic_time.rb:15 def monotonic_time(unit = T.unsafe(nil)); end @@ -107,8 +110,6 @@ module Concurrent class << self # Abort a currently running transaction - see `Concurrent::atomically`. # - # @raise [Transaction::AbortError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:148 def abort_transaction; end @@ -139,10 +140,9 @@ module Concurrent # b = new TVar(100) # # Concurrent::atomically do - # a.value -= 10 - # b.value += 10 + # a.value -= 10 + # b.value += 10 # end - # @raise [ArgumentError] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:148 def atomically; end @@ -160,8 +160,6 @@ module Concurrent # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:194 def available_processor_count; end - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:80 def call_dataflow(method, executor, *inputs, &block); end @@ -195,7 +193,6 @@ module Concurrent # Create a stdlib logger with provided level and output. # If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+. - # # @deprecated # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:73 @@ -204,14 +201,17 @@ module Concurrent # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. # {include:file:docs-source/dataflow.md} # - # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon - # @raise [ArgumentError] if no block is given - # @raise [ArgumentError] if any of the inputs are not `IVar`s - # @return [Object] the result of all the operations + # @param [Future] inputs zero or more `Future` operations that this dataflow depends upon + # # @yield The operation to perform once all the dependencies are met - # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldparam [Future] inputs each of the `Future` inputs to the dataflow # @yieldreturn [Object] the result of the block operation # + # @return [Object] the result of all the operations + # + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:37 def dataflow(*inputs, &block); end @@ -229,7 +229,6 @@ module Concurrent # to ensure that the handlers are shutdown properly prior to application # exit by calling `AtExit.run` method. # - # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. # @note this option should be needed only because of `at_exit` ordering # issues which may arise when running some of the testing frameworks. # E.g. Minitest's test-suite runs itself in `at_exit` callback which @@ -238,13 +237,13 @@ module Concurrent # @note This method should *never* be called # from within a gem. It should *only* be used from within the main # application and even then it should be used only when necessary. + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:48 def disable_at_exit_handlers!; end # General access point to global executors. - # - # @param executor_identifier [Symbol, Executor] symbols: + # @param [Symbol, Executor] executor_identifier symbols: # - :fast - {Concurrent.global_fast_executor} # - :io - {Concurrent.global_io_executor} # - :immediate - {Concurrent.global_immediate_executor} @@ -285,23 +284,26 @@ module Concurrent # Leave a transaction without committing or aborting - see `Concurrent::atomically`. # - # @raise [Transaction::LeaveError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:148 def leave_transaction; end - # Returns the current time as tracked by the application monotonic clock. + # @!macro monotonic_get_time + # + # Returns the current time as tracked by the application monotonic clock. # - # @param unit [Symbol] the time unit to be returned, can be either - # :float_second, :float_millisecond, :float_microsecond, :second, - # :millisecond, :microsecond, or :nanosecond default to :float_second. - # @return [Float] The current monotonic time since some unspecified - # starting point + # @param [Symbol] unit the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # @!macro monotonic_clock_warning # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/monotonic_time.rb:18 def monotonic_time(unit = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:7 def mutex_owned_per_thread?; end @@ -323,10 +325,12 @@ module Concurrent # work or an exception is raised the function will simply return 1. # # @return [Integer] number physical processor cores on the current system - # @see http://linux.die.net/man/8/sysctl + # + # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx # @see http://www.unix.com/man-page/osx/1/HWPREFS/ - # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # @see http://linux.die.net/man/8/sysctl # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:181 def physical_processor_count; end @@ -345,6 +349,7 @@ module Concurrent # Otherwise Ruby's Etc.nprocessors will be used. # # @return [Integer] number of processors seen by the OS or Java runtime + # # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:160 @@ -359,7 +364,6 @@ module Concurrent def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. - # # @deprecated # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:101 @@ -367,104 +371,92 @@ module Concurrent end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:38 class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object - # @return [AbstractExchanger] a new instance of AbstractExchanger - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:44 def initialize; end - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. + # @!macro exchanger_method_do_exchange # + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. # - # In some edge cases when a `timeout` is given a return value of `nil` may be - # ambiguous. Specifically, if `nil` is a valid value in the exchange it will - # be impossible to tell whether `nil` is the actual return value or if it - # signifies timeout. When `nil` is a valid value in the exchange consider - # using {#exchange!} or {#try_exchange} instead. + # @param [Object] value the value to exchange with another thread + # @param [Numeric, nil] timeout in seconds, `nil` blocks indefinitely # - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @param value [Object] the value to exchange with another thread - # @return [Object] the value exchanged by the other thread or `nil` on timeout + # @!macro exchanger_method_exchange + # + # In some edge cases when a `timeout` is given a return value of `nil` may be + # ambiguous. Specifically, if `nil` is a valid value in the exchange it will + # be impossible to tell whether `nil` is the actual return value or if it + # signifies timeout. When `nil` is a valid value in the exchange consider + # using {#exchange!} or {#try_exchange} instead. + # + # @return [Object] the value exchanged by the other thread or `nil` on timeout # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:69 def exchange(value, timeout = T.unsafe(nil)); end - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. + # @!macro exchanger_method_do_exchange + # @!macro exchanger_method_exchange_bang # + # On timeout a {Concurrent::TimeoutError} exception will be raised. # - # On timeout a {Concurrent::TimeoutError} exception will be raised. - # - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @param value [Object] the value to exchange with another thread - # @raise [Concurrent::TimeoutError] on timeout - # @return [Object] the value exchanged by the other thread + # @return [Object] the value exchanged by the other thread + # @raise [Concurrent::TimeoutError] on timeout # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:80 def exchange!(value, timeout = T.unsafe(nil)); end - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. + # @!macro exchanger_method_do_exchange + # @!macro exchanger_method_try_exchange # + # The return value will be a {Concurrent::Maybe} set to `Just` on success or + # `Nothing` on timeout. # - # The return value will be a {Concurrent::Maybe} set to `Just` on success or - # `Nothing` on timeout. + # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with + # the item exchanged by the other thread as `#value`; on timeout a + # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` # - # @example + # @example # - # exchanger = Concurrent::Exchanger.new + # exchanger = Concurrent::Exchanger.new # - # result = exchanger.exchange(:foo, 0.5) + # result = exchanger.exchange(:foo, 0.5) # - # if result.just? - # puts result.value #=> :bar - # else - # puts 'timeout' - # end - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @param value [Object] the value to exchange with another thread - # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with - # the item exchanged by the other thread as `#value`; on timeout a - # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` + # if result.just? + # puts result.value #=> :bar + # else + # puts 'timeout' + # end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:109 def try_exchange(value, timeout = T.unsafe(nil)); end private - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. + # @!macro exchanger_method_do_exchange # - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @param value [Object] the value to exchange with another thread - # @raise [NotImplementedError] # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:122 def do_exchange(value, timeout); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:41 Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) +# @!macro abstract_executor_service_public_api +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:10 class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject include ::Concurrent::Concern::Logging @@ -473,50 +465,48 @@ class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::Locka # Create a new thread pool. # - # @return [AbstractExecutorService] a new instance of AbstractExecutorService - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:23 def initialize(opts = T.unsafe(nil), &block); end + # @!macro executor_service_method_auto_terminate_setter + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:72 def auto_terminate=(value); end - # @return [Boolean] + # @!macro executor_service_method_auto_terminate_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:67 def auto_terminate?; end - # Returns the value of attribute fallback_policy. + # @!macro executor_service_attr_reader_fallback_policy # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:18 def fallback_policy; end - # @raise [NotImplementedError] + # @!macro executor_service_method_kill # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:42 def kill; end - # Returns the value of attribute name. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:20 def name; end - # @return [Boolean] + # @!macro executor_service_method_running_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:52 def running?; end - # @raise [NotImplementedError] + # @!macro executor_service_method_shutdown # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:37 def shutdown; end - # @return [Boolean] + # @!macro executor_service_method_shutdown_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:62 def shutdown?; end - # @return [Boolean] + # @!macro executor_service_method_shuttingdown_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:57 def shuttingdown?; end @@ -524,7 +514,7 @@ class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::Locka # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:32 def to_s; end - # @raise [NotImplementedError] + # @!macro executor_service_method_wait_for_termination # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:47 def wait_for_termination(timeout = T.unsafe(nil)); end @@ -535,29 +525,31 @@ class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::Locka # size reaches `max_queue`. The reason for the indirection of an action # is so that the work can be deferred outside of synchronization. # - # @param args [Array] the arguments to the task which is being handled. + # @param [Array] args the arguments to the task which is being handled. + # + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:85 def fallback_action(*args); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:126 def ns_auto_terminate?; end - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:106 def ns_execute(*args, &task); end - # Callback method called when the executor has been killed. - # The default behavior is to do nothing. + # @!macro executor_service_method_ns_kill_execution + # + # Callback method called when the executor has been killed. + # The default behavior is to do nothing. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:122 def ns_kill_execution; end - # Callback method called when an orderly shutdown has completed. - # The default behavior is to signal all waiting threads. + # @!macro executor_service_method_ns_shutdown_execution + # + # Callback method called when an orderly shutdown has completed. + # The default behavior is to signal all waiting threads. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:114 def ns_shutdown_execution; end @@ -568,6 +560,9 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:15 Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) +# @!visibility private +# @!macro internal_implementation_note +# # An abstract implementation of local storage, with sub-classes for # per-thread and per-fiber locals. # @@ -597,8 +592,6 @@ Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Ar # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:35 class Concurrent::AbstractLocals - # @return [AbstractLocals] a new instance of AbstractLocals - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:36 def initialize; end @@ -629,15 +622,11 @@ class Concurrent::AbstractLocals # Returns the locals for the current scope, or nil if none exist. # - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:128 def locals; end # Returns the locals for the current scope, creating them if necessary. # - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:133 def locals!; end @@ -769,12 +758,15 @@ end # end # ``` # +# @!macro agent_await_warning # -# **NOTE** Never, *under any circumstances*, call any of the "await" methods -# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action -# block/proc/lambda. The call will block the Agent and will always fail. -# Calling either {#await} or {#wait} (with a timeout of `nil`) will -# hopelessly deadlock the Agent with no possibility of recovery. +# **NOTE** Never, *under any circumstances*, call any of the "await" methods +# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action +# block/proc/lambda. The call will block the Agent and will always fail. +# Calling either {#await} or {#wait} (with a timeout of `nil`) will +# hopelessly deadlock the Agent with no possibility of recovery. +# +# @!macro thread_safe_variable_comparison # # @see http://clojure.org/Agents Clojure Agents # @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State @@ -811,12 +803,12 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # held until {#restart} is called. The {#value} method will still work, # returning the value of the Agent before the error. # - # @option opts - # @option opts - # @option opts - # @param initial [Object] the initial value - # @param opts [Hash] the configuration options - # @return [Agent] a new instance of Agent + # @param [Object] initial the initial value + # @param [Hash] opts the configuration options + # + # @option opts [Symbol] :error_mode either `:continue` or `:fail` + # @option opts [nil, Proc] :error_handler the (optional) error handler + # @option opts [nil, Proc] :validator the (optional) validation procedure # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:220 def initialize(initial, opts = T.unsafe(nil)); end @@ -825,7 +817,7 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # in a thread from a thread pool, the {#value} will be set to the return # value of the action. Appropriate for actions that may block on IO. # - # @param action [Proc] the action dispatch to be enqueued + # @param [Proc] action the action dispatch to be enqueued # @return [Concurrent::Agent] self # @see #send_off # @@ -843,15 +835,10 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # current_value = agent.await.value # ``` # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # # @return [Boolean] self # + # @!macro agent_await_warning + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:350 def await; end @@ -859,16 +846,11 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # thread or nested by the Agent, have occurred, or the timeout (in seconds) # has elapsed. # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait + # @param [Float] timeout the maximum number of seconds to wait # @return [Boolean] true if all actions complete before timeout else false # + # @!macro agent_await_warning + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:363 def await_for(timeout); end @@ -876,25 +858,16 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # thread or nested by the Agent, have occurred, or the timeout (in seconds) # has elapsed. # + # @param [Float] timeout the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait # @raise [Concurrent::TimeoutError] when timeout is reached - # @return [Boolean] true if all actions complete before timeout + # + # @!macro agent_await_warning # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:377 def await_for!(timeout); end - # The current value (state) of the Agent, irrespective of any pending or - # in-progress actions. The value is always available and is non-blocking. - # - # @return [Object] the current value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:233 def deref; end @@ -914,49 +887,14 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # Is the Agent in a failed state? # - # @return [Boolean] # @see #restart # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:402 def failed?; end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:298 def post(*args, &action); end - # When {#failed?} and {#error_mode} is `:fail`, returns the error object - # which caused the failure, else `nil`. When {#error_mode} is `:continue` - # will *always* return `nil`. - # - # @return [nil, Error] the error which caused the failure when {#failed?} - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:244 def reason; end @@ -969,210 +907,90 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # remain failed with its old {#value} and {#error}. Observers, if any, will # not be notified of the new state. # - # @option opts - # @param new_value [Object] the new value for the Agent once restarted - # @param opts [Hash] the configuration options - # @raise [Concurrent:AgentError] when not failed + # @param [Object] new_value the new value for the Agent once restarted + # @param [Hash] opts the configuration options + # @option opts [Symbol] :clear_actions true if all enqueued but unprocessed + # actions should be discarded on restart, else false (default: false) # @return [Boolean] true # + # @raise [Concurrent:AgentError] when not failed + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:424 def restart(new_value, opts = T.unsafe(nil)); end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent + # @!macro agent_send + # + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param [Array] args zero or more arguments to be passed to + # the action + # @param [Proc] action the action dispatch to be enqueued + # + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam [Object] value the current {#value} of the Agent + # @yieldparam [Array] args zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # @!macro send_return + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:278 def send(*args, &action); end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - # @return [Boolean] true if the action is successfully enqueued - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent + # @!macro agent_send + # + # @!macro send_bang_return_and_raise + # @return [Boolean] true if the action is successfully enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:287 def send!(*args, &action); end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent + # @!macro agent_send + # @!macro send_return # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:294 def send_off(*args, &action); end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - # @return [Boolean] true if the action is successfully enqueued - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent + # @!macro agent_send + # @!macro send_bang_return_and_raise # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:302 def send_off!(*args, &action); end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @param executor [Concurrent::ExecutorService] the executor on which the + # @!macro agent_send + # @!macro send_return + # @param [Concurrent::ExecutorService] executor the executor on which the # action is to be dispatched - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:311 def send_via(executor, *args, &action); end - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param action [Proc] the action dispatch to be enqueued - # @param args [Array] zero or more arguments to be passed to - # the action - # @param executor [Concurrent::ExecutorService] the executor on which the + # @!macro agent_send + # @!macro send_bang_return_and_raise + # @param [Concurrent::ExecutorService] executor the executor on which the # action is to be dispatched - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - # @return [Boolean] true if the action is successfully enqueued - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldreturn [Object] the new value of the Agent # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:319 def send_via!(executor, *args, &action); end - # Is the Agent in a failed state? - # - # @return [Boolean] - # @see #restart - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:406 def stopped?; end @@ -1191,23 +1009,16 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # Provided mainly for consistency with other classes in this library. Prefer # the various `await` methods instead. # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait + # @param [Float] timeout the maximum number of seconds to wait # @return [Boolean] true if all actions complete before timeout else false # + # @!macro agent_await_warning + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:393 def wait(timeout = T.unsafe(nil)); end private - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:510 def enqueue_action_job(action, args, executor); end @@ -1242,16 +1053,11 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # failed. Will never return if a failed Agent is restart with # `:clear_actions` true. # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param agents [Array] the Agents on which to wait + # @param [Array] agents the Agents on which to wait # @return [Boolean] true # + # @!macro agent_await_warning + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:449 def await(*agents); end @@ -1259,17 +1065,12 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # the given Agents, from this thread or nested by the given Agents, have # occurred, or the timeout (in seconds) has elapsed. # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param agents [Array] the Agents on which to wait - # @param timeout [Float] the maximum number of seconds to wait + # @param [Float] timeout the maximum number of seconds to wait + # @param [Array] agents the Agents on which to wait # @return [Boolean] true if all actions complete before timeout else false # + # @!macro agent_await_warning + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:463 def await_for(timeout, *agents); end @@ -1277,17 +1078,12 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject # the given Agents, from this thread or nested by the given Agents, have # occurred, or the timeout (in seconds) has elapsed. # + # @param [Float] timeout the maximum number of seconds to wait + # @param [Array] agents the Agents on which to wait + # @return [Boolean] true if all actions complete before timeout # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param agents [Array] the Agents on which to wait - # @param timeout [Float] the maximum number of seconds to wait # @raise [Concurrent::TimeoutError] when timeout is reached - # @return [Boolean] true if all actions complete before timeout + # @!macro agent_await_warning # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:482 def await_for!(timeout, *agents); end @@ -1313,71 +1109,33 @@ Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:167 class Concurrent::Agent::Error < ::StandardError - # @return [Error] a new instance of Error - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:168 def initialize(message = T.unsafe(nil)); end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 class Concurrent::Agent::Job < ::Struct - # Returns the value of attribute action - # - # @return [Object] the current value of action - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def action; end - # Sets the attribute action - # - # @param value [Object] the value to set the attribute action to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def action=(_); end - # Returns the value of attribute args - # - # @return [Object] the current value of args - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def args; end - # Sets the attribute args - # - # @param value [Object] the value to set the attribute args to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def args=(_); end - # Returns the value of attribute caller - # - # @return [Object] the current value of caller - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def caller; end - # Sets the attribute caller - # - # @param value [Object] the value to set the attribute caller to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def caller=(_); end - # Returns the value of attribute executor - # - # @return [Object] the current value of executor - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def executor; end - # Sets the attribute executor - # - # @param value [Object] the value to set the attribute executor to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 def executor=(_); end @@ -1404,27 +1162,17 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:176 class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error - # @return [ValidationError] a new instance of ValidationError - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:177 def initialize(message = T.unsafe(nil)); end end -# A thread-safe subclass of Array. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`. -# -# @note `a += b` is **not** a **thread-safe** operation on -# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` -# which is concatenation of `a` and `b`, then it writes the concatenation to `a`. -# The read and write are independent operations they do not form a single atomic -# operation therefore when two `+=` operations are executed concurrently updates -# may be lost. Use `#concat` instead. -# @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` +# @!macro concurrent_array # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/array.rb:53 class Concurrent::Array < ::Array; end +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/array.rb:22 Concurrent::ArrayImplementation = Array @@ -1617,26 +1365,27 @@ Concurrent::ArrayImplementation = Array # @example # # class Echo -# include Concurrent::Async +# include Concurrent::Async # -# def echo(msg) -# print "#{msg}\n" -# end +# def echo(msg) +# print "#{msg}\n" +# end # end # # horn = Echo.new # horn.echo('zero') # synchronous, not thread-safe -# # returns the actual return value of the method +# # returns the actual return value of the method # # horn.async.echo('one') # asynchronous, non-blocking, thread-safe -# # returns an IVar in the :pending state +# # returns an IVar in the :pending state # # horn.await.echo('two') # synchronous, blocking, thread-safe -# # returns an IVar in the :complete state +# # returns an IVar in the :complete state +# # @see Concurrent::Actor -# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ -# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server # @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia +# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server +# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:217 module Concurrent::Async @@ -1648,16 +1397,19 @@ module Concurrent::Async # object's thread. The final disposition of the method call can be obtained # by inspecting the returned future. # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. + # @!macro async_thread_safety_warning + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # # @raise [NameError] the object does not respond to the requested method # @raise [ArgumentError] the given `args` do not match the arity of # the requested method - # @return [Concurrent::IVar] the pending result of the asynchronous operation # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:412 def async; end @@ -1668,57 +1420,20 @@ module Concurrent::Async # completed. The final disposition of the delegated method can be obtained # by inspecting the returned future. # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. + # @!macro async_thread_safety_warning + # + # @return [Concurrent::IVar] the completed result of the synchronous operation + # # @raise [NameError] the object does not respond to the requested method # @raise [ArgumentError] the given `args` do not match the arity of the # requested method - # @return [Concurrent::IVar] the completed result of the synchronous operation # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:430 def await; end - # Causes the chained method call to be performed synchronously on the - # current thread. The delegated will return a future in either the - # `:fulfilled` or `:rejected` state and the delegated method will have - # completed. The final disposition of the delegated method can be obtained - # by inspecting the returned future. - # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of the - # requested method - # @return [Concurrent::IVar] the completed result of the synchronous operation - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:433 def call; end - # Causes the chained method call to be performed asynchronously on the - # object's thread. The delegated method will return a future in the - # `:pending` state and the method call will have been scheduled on the - # object's thread. The final disposition of the method call can be obtained - # by inspecting the returned future. - # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of - # the requested method - # @return [Concurrent::IVar] the pending result of the asynchronous operation - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:415 def cast; end @@ -1727,11 +1442,13 @@ module Concurrent::Async # @note This method *must* be called immediately upon object construction. # This is the only way thread-safe initialization can be guaranteed. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:441 def init_synchronization; end class << self - # @private + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:262 def included(base); end @@ -1739,19 +1456,24 @@ module Concurrent::Async # Check for the presence of a method on an object and determine if a given # set of arguments matches the required arity. # + # @param [Object] obj the object to check against + # @param [Symbol] method the method to check the object for + # @param [Array] args zero or more arguments for the arity check + # + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # # @note This check is imperfect because of the way Ruby reports the arity of # methods with a variable number of arguments. It is possible to determine # if too few arguments are given but impossible to determine if too many # arguments are given. This check may also fail to recognize dynamic behavior # of the object, such as methods simulated with `method_missing`. - # @param args [Array] zero or more arguments for the arity check - # @param method [Symbol] the method to check the object for - # @param obj [Object] the object to check against - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` + # + # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing - # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity + # + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:250 def validate_argc(obj, method, *args); end @@ -1760,23 +1482,26 @@ end # Delegates asynchronous, thread-safe method calls to the wrapped object. # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:282 class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject # Create a new delegator object wrapping the given delegate. # - # @param delegate [Object] the object to wrap and delegate method calls to - # @return [AsyncDelegator] a new instance of AsyncDelegator + # @param [Object] delegate the object to wrap and delegate method calls to # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:288 def initialize(delegate); end # Delegates method calls to the wrapped object. # - # @param args [Array] zero or more arguments to the method - # @param method [Symbol] the method being called + # @param [Symbol] method the method being called + # @param [Array] args zero or more arguments to the method + # + # @return [IVar] the result of the method call + # # @raise [NameError] the object does not respond to `method` method # @raise [ArgumentError] the given `args` do not match the arity of `method` - # @return [IVar] the result of the method call # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:305 def method_missing(method, *args, &block); end @@ -1796,8 +1521,7 @@ class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::Lockabl # Check whether the method is responsive # - # @param method [Symbol] the method being called - # @return [Boolean] + # @param [Symbol] method the method being called # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:322 def respond_to_missing?(method, include_private = T.unsafe(nil)); end @@ -1805,23 +1529,26 @@ end # Delegates synchronous, thread-safe method calls to the wrapped object. # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:360 class Concurrent::Async::AwaitDelegator # Create a new delegator object wrapping the given delegate. # - # @param delegate [AsyncDelegator] the object to wrap and delegate method calls to - # @return [AwaitDelegator] a new instance of AwaitDelegator + # @param [AsyncDelegator] delegate the object to wrap and delegate method calls to # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:365 def initialize(delegate); end # Delegates method calls to the wrapped object. # - # @param args [Array] zero or more arguments to the method - # @param method [Symbol] the method being called + # @param [Symbol] method the method being called + # @param [Array] args zero or more arguments to the method + # + # @return [IVar] the result of the method call + # # @raise [NameError] the object does not respond to `method` method # @raise [ArgumentError] the given `args` do not match the arity of `method` - # @return [IVar] the result of the method call # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:378 def method_missing(method, *args, &block); end @@ -1830,13 +1557,14 @@ class Concurrent::Async::AwaitDelegator # Check whether the method is responsive # - # @param method [Symbol] the method being called - # @return [Boolean] + # @param [Symbol] method the method being called # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:387 def respond_to_missing?(method, include_private = T.unsafe(nil)); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:269 module Concurrent::Async::ClassMethods # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:270 @@ -1891,38 +1619,7 @@ end # # Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. # -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. +# @!macro thread_safe_variable_comparison # # @see http://clojure.org/atoms Clojure Atoms # @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State @@ -1934,11 +1631,16 @@ class Concurrent::Atom < ::Concurrent::Synchronization::Object # Create a new atom with the given initial value. # - # @option opts - # @param opts [Hash] The options used to configure the atom - # @param value [Object] The initial value + # @param [Object] value The initial value + # @param [Hash] opts The options used to configure the atom + # @option opts [Proc] :validator (nil) Optional proc used to validate new + # values. It must accept one and only one argument which will be the + # intended new value. The validator will return true if the new value + # is acceptable else return false (preferably) or raise an exception. + # + # @!macro deref_options + # # @raise [ArgumentError] if the validator is not a `Proc` (when given) - # @return [Atom] a new instance of Atom # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:121 def initialize(value, opts = T.unsafe(nil)); end @@ -1951,8 +1653,9 @@ class Concurrent::Atom < ::Concurrent::Synchronization::Object # value successfully validates against the (optional) validator given # at construction. # - # @param new_value [Object] The intended new value. - # @param old_value [Object] The expected current value. + # @param [Object] old_value The expected current value. + # @param [Object] new_value The intended new value. + # # @return [Boolean] True if the value is changed else false. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:181 @@ -1965,7 +1668,8 @@ class Concurrent::Atom < ::Concurrent::Synchronization::Object # current value so long as the new value successfully validates against the # (optional) validator given at construction. # - # @param new_value [Object] The intended new value. + # @param [Object] new_value The intended new value. + # # @return [Object] The final value of the atom after all operations and # validations are complete. # @@ -1988,23 +1692,23 @@ class Concurrent::Atom < ::Concurrent::Synchronization::Object # # @note The given block may be called multiple times, and thus should be free # of side effects. - # @param args [Object] Zero or more arguments passed to the block. - # @raise [ArgumentError] When no block is given. - # @return [Object] The final value of the atom after all operations and - # validations are complete. + # + # @param [Object] args Zero or more arguments passed to the block. + # # @yield [value, args] Calculates a new value for the atom based on the # current value and any supplied arguments. - # @yieldparam args [Object] All arguments passed to the function, in order. # @yieldparam value [Object] The current value of the atom. + # @yieldparam args [Object] All arguments passed to the function, in order. # @yieldreturn [Object] The intended new value of the atom. # + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # @raise [ArgumentError] When no block is given. + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:157 def swap(*args); end - # The current value of the atom. - # - # @return [Object] The current value. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 def value; end @@ -2021,7 +1725,7 @@ class Concurrent::Atom < ::Concurrent::Synchronization::Object # Is the new value valid? # - # @param new_value [Object] The intended new value. + # @param [Object] new_value The intended new value. # @return [Boolean] false if the validator function returns false or raises # an exception else true # @@ -2032,64 +1736,36 @@ class Concurrent::Atom < ::Concurrent::Synchronization::Object def value=(value); end end -# A boolean value that can be updated atomically. Reads and writes to an atomic -# boolean and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: +# @!macro atomic_boolean # -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicBoolean... -# 2.790000 0.000000 2.790000 ( 2.791454) -# Testing with Concurrent::CAtomicBoolean... -# 0.740000 0.000000 0.740000 ( 0.740206) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicBoolean... -# 5.240000 2.520000 7.760000 ( 3.683000) -# Testing with Concurrent::JavaAtomicBoolean... -# 3.340000 0.010000 3.350000 ( 0.855000) -# ``` +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# @!macro thread_safe_variable_comparison # -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# @!macro atomic_boolean_public_api # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:119 class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean - # @return [String] Short string representation. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:125 def inspect; end @@ -2099,11 +1775,17 @@ class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean def to_s; end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:82 Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean # Define update methods that use direct paths # +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb:9 module Concurrent::AtomicDirectUpdate # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb:15 @@ -2116,64 +1798,36 @@ module Concurrent::AtomicDirectUpdate def update; end end -# A numeric value that can be updated atomically. Reads and writes to an atomic -# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: +# @!macro atomic_fixnum # -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicFixnum... -# 3.130000 0.000000 3.130000 ( 3.136505) -# Testing with Concurrent::CAtomicFixnum... -# 0.790000 0.000000 0.790000 ( 0.785550) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicFixnum... -# 5.460000 2.460000 7.920000 ( 3.715000) -# Testing with Concurrent::JavaAtomicFixnum... -# 4.520000 0.030000 4.550000 ( 1.187000) -# ``` +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# @!macro thread_safe_variable_comparison +# +# Performance: # -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# @!macro atomic_fixnum_public_api # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:136 class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum - # @return [String] Short string representation. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:142 def inspect; end @@ -2183,20 +1837,22 @@ class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum def to_s; end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:99 Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum # An atomic reference which maintains an object reference along with a mark bit # that can be updated atomically. # -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html +# java.util.concurrent.atomic.AtomicMarkableReference # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:10 class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization - # @return [AtomicMarkableReference] a new instance of AtomicMarkableReference - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:15 def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end @@ -2208,32 +1864,18 @@ class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Objec # - the current value == the expected value && # - the current mark == the expected mark # - # that the actual value was not equal to the expected value or the - # actual mark was not equal to the expected mark + # @param [Object] expected_val the expected value + # @param [Object] new_val the new value + # @param [Boolean] expected_mark the expected mark + # @param [Boolean] new_mark the new mark # - # @param expected_mark [Boolean] the expected mark - # @param expected_val [Object] the expected value - # @param new_mark [Boolean] the new mark - # @param new_val [Object] the new value # @return [Boolean] `true` if successful. A `false` return indicates + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:33 def compare_and_set(expected_val, new_val, expected_mark, new_mark); end - # Atomically sets the value and mark to the given updated value and - # mark given both: - # - the current value == the expected value && - # - the current mark == the expected mark - # - # that the actual value was not equal to the expected value or the - # actual mark was not equal to the expected mark - # - # @param expected_mark [Boolean] the expected mark - # @param expected_val [Object] the expected value - # @param new_mark [Boolean] the new mark - # @param new_val [Object] the new value - # @return [Boolean] `true` if successful. A `false` return indicates - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:59 def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end @@ -2251,18 +1893,15 @@ class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Objec # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:78 def mark; end - # Gets the current marked value - # - # @return [Boolean] the current marked value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:82 def marked?; end # _Unconditionally_ sets to the given value of both the reference and # the mark. # - # @param new_mark [Boolean] the new mark - # @param new_val [Object] the new value + # @param [Object] new_val the new value + # @param [Boolean] new_mark the new mark + # # @return [Array] both the new value and the new mark # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:91 @@ -2271,13 +1910,13 @@ class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Objec # Pass the current value to the given block, replacing it with the # block's result. Simply return nil if update fails. # - # the update failed - # - # @return [Array] the new value and marked state, or nil if # @yield [Object] Calculate a new value and marked state for the atomic # reference using given (old) value and (old) marked - # @yieldparam old_mark [Boolean] the starting state of marked - # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam [Object] old_val the starting value of the atomic reference + # @yieldparam [Boolean] old_mark the starting state of marked + # + # @return [Array] the new value and marked state, or nil if + # the update failed # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:152 def try_update; end @@ -2286,12 +1925,14 @@ class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Objec # with the block's result. Raise an exception if the update # fails. # - # @raise [Concurrent::ConcurrentUpdateError] if the update fails - # @return [Array] the new value and marked state # @yield [Object] Calculate a new value and marked state for the atomic # reference using given (old) value and (old) marked - # @yieldparam old_mark [Boolean] the starting state of marked - # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam [Object] old_val the starting value of the atomic reference + # @yieldparam [Boolean] old_mark the starting state of marked + # + # @return [Array] the new value and marked state + # + # @raise [Concurrent::ConcurrentUpdateError] if the update fails # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:128 def try_update!; end @@ -2300,11 +1941,12 @@ class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Objec # with the block's results. May retry if the value changes during the # block's execution. # - # @return [Array] the new value and new mark # @yield [Object] Calculate a new value and marked state for the atomic # reference using given (old) value and (old) marked - # @yieldparam old_mark [Boolean] the starting state of marked - # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam [Object] old_val the starting value of the atomic reference + # @yieldparam [Boolean] old_mark the starting state of marked + # + # @return [Array] the new value and new mark # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:105 def update; end @@ -2339,16 +1981,12 @@ end # Special "compare and set" handling of numeric values. # +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb:7 module Concurrent::AtomicNumericCompareAndSetWrapper - # Atomically sets the value to the given updated value if - # the current value == the expected value. - # - # that the actual value was not equal to the expected value. - # - # @param new_value [Object] the new value - # @param old_value [Object] the expected value - # @return [Boolean] `true` if successful. A `false` return indicates + # @!macro atomic_reference_method_compare_and_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb:10 def compare_and_set(old_value, new_value); end @@ -2357,46 +1995,83 @@ end # An object reference that may be updated atomically. All read and write # operations have java volatile semantic. # -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. +# @!macro thread_safe_variable_comparison # # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html # +# @!method initialize(value = nil) +# @!macro atomic_reference_method_initialize +# @param [Object] value The initial value. +# +# @!method get +# @!macro atomic_reference_method_get +# Gets the current value. +# @return [Object] the current value +# +# @!method set(new_value) +# @!macro atomic_reference_method_set +# Sets to the given value. +# @param [Object] new_value the new value +# @return [Object] the new value +# +# @!method get_and_set(new_value) +# @!macro atomic_reference_method_get_and_set +# Atomically sets to the given value and returns the old value. +# @param [Object] new_value the new value +# @return [Object] the old value +# +# @!method compare_and_set(old_value, new_value) +# @!macro atomic_reference_method_compare_and_set +# +# Atomically sets the value to the given updated value if +# the current value == the expected value. +# +# @param [Object] old_value the expected value +# @param [Object] new_value the new value +# +# @return [Boolean] `true` if successful. A `false` return indicates +# that the actual value was not equal to the expected value. +# +# @!method update +# Pass the current value to the given block, replacing it +# with the block's result. May retry if the value changes +# during the block's execution. +# +# @yield [Object] Calculate a new value for the atomic reference using +# given (old) value +# @yieldparam [Object] old_value the starting value of the atomic reference +# @return [Object] the new value +# +# @!method try_update +# Pass the current value to the given block, replacing it +# with the block's result. Return nil if the update fails. +# +# @yield [Object] Calculate a new value for the atomic reference using +# given (old) value +# @yieldparam [Object] old_value the starting value of the atomic reference +# @note This method was altered to avoid raising an exception by default. +# Instead, this method now returns `nil` in case of failure. For more info, +# please see: https://github.com/ruby-concurrency/concurrent-ruby/pull/336 +# @return [Object] the new value, or nil if update failed +# +# @!method try_update! +# Pass the current value to the given block, replacing it +# with the block's result. Raise an exception if the update +# fails. +# +# @yield [Object] Calculate a new value for the atomic reference using +# given (old) value +# @yieldparam [Object] old_value the starting value of the atomic reference +# @note This behavior mimics the behavior of the original +# `AtomicReference#try_update` API. The reason this was changed was to +# avoid raising exceptions (which are inherently slow) by default. For more +# info: https://github.com/ruby-concurrency/concurrent-ruby/pull/336 +# @return [Object] the new value +# @raise [Concurrent::ConcurrentUpdateError] if the update fails +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:126 class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference - # @return [String] Short string representation. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:133 def inspect; end @@ -2406,14 +2081,13 @@ class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference def to_s; end end +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:18 Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:30 class Concurrent::CRubySet < ::Set - include ::Set::SubclassCompatible - extend ::Set::SubclassCompatible::ClassMethods - # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 def initialize(*args, &block); end @@ -2498,9 +2172,6 @@ class Concurrent::CRubySet < ::Set # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 def empty?(*args); end - # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 - def encode_with(*args); end - # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 def eql?(*args); end @@ -2514,13 +2185,16 @@ class Concurrent::CRubySet < ::Set def flatten!(*args); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 - def hash(*args); end + def flatten_merge(*args); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 - def include?(*args); end + def freeze(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def hash(*args); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 - def init_with(*args); end + def include?(*args); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 def inspect(*args); end @@ -2626,27 +2300,28 @@ end # # The API and behavior of this class are based on Java's `CachedThreadPool` # +# @!macro thread_pool_options +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb:27 class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor - # Create a new thread pool. + # @!macro cached_thread_pool_method_initialize + # + # Create a new thread pool. + # + # @param [Hash] opts the options defining pool behavior. + # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy + # + # @raise [ArgumentError] if `fallback_policy` is not a known policy # - # @option opts - # @param opts [Hash] the options defining pool behavior. - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # @return [CachedThreadPool] a new instance of CachedThreadPool - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb:39 def initialize(opts = T.unsafe(nil)); end private - # Create a new thread pool. - # - # @option opts - # @param opts [Hash] the options defining pool behavior. - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # @!macro cached_thread_pool_method_initialize + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb:51 def ns_initialize(opts); end @@ -2657,6 +2332,12 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:9 class Concurrent::CancelledOperationError < ::Concurrent::Error; end +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:7 module Concurrent::Collection; end @@ -2669,45 +2350,39 @@ module Concurrent::Collection; end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:12 class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject - # @api private - # @return [CopyOnNotifyObserverSet] a new instance of CopyOnNotifyObserverSet - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:14 def initialize; end - # @api private + # @!macro observable_add_observer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:20 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - # @api private + # @!macro observable_count_observers # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:55 def count_observers; end - # @api private + # @!macro observable_delete_observer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:39 def delete_observer(observer); end - # @api private + # @!macro observable_delete_observers # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:47 def delete_observers; end # Notifies all registered observers with optional args and deletes them. # - # @api private - # @param args [Object] arguments to be passed to each observer + # @param [Object] args arguments to be passed to each observer # @return [CopyOnWriteObserverSet] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:72 def notify_and_delete_observers(*args, &block); end # Notifies all registered observers with optional args - # - # @api private - # @param args [Object] arguments to be passed to each observer + # @param [Object] args arguments to be passed to each observer # @return [CopyOnWriteObserverSet] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:62 @@ -2715,26 +2390,17 @@ class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchroniz protected - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:80 def ns_initialize; end private - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:86 def duplicate_and_clear_observers; end - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:94 def duplicate_observers; end - # @api private - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:98 def notify_to(observers, *args); end end @@ -2747,45 +2413,39 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:11 class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject - # @api private - # @return [CopyOnWriteObserverSet] a new instance of CopyOnWriteObserverSet - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:13 def initialize; end - # @api private + # @!macro observable_add_observer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:19 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - # @api private + # @!macro observable_count_observers # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:56 def count_observers; end - # @api private + # @!macro observable_delete_observer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:40 def delete_observer(observer); end - # @api private + # @!macro observable_delete_observers # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:50 def delete_observers; end # Notifies all registered observers with optional args and deletes them. # - # @api private - # @param args [Object] arguments to be passed to each observer + # @param [Object] args arguments to be passed to each observer # @return [CopyOnWriteObserverSet] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:72 def notify_and_delete_observers(*args, &block); end # Notifies all registered observers with optional args - # - # @api private - # @param args [Object] arguments to be passed to each observer + # @param [Object] args arguments to be passed to each observer # @return [CopyOnWriteObserverSet] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:63 @@ -2793,42 +2453,33 @@ class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchroniza protected - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:80 def ns_initialize; end private - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:102 def clear_observers_and_return_old; end - # @api private - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:86 def notify_to(observers, *args); end - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:94 def observers; end - # @api private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:98 def observers=(new_set); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:10 Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:10 class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend - # @return [MriMapBackend] a new instance of MriMapBackend - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:12 def initialize(options = T.unsafe(nil), &default_proc); end @@ -2866,6 +2517,8 @@ class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcu def replace_pair(key, old_value, new_value); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:9 class Concurrent::Collection::NonConcurrentMapBackend # WARNING: all public methods of the class must operate on the @backend @@ -2873,8 +2526,6 @@ class Concurrent::Collection::NonConcurrentMapBackend # SynchronizedMapBackend which uses a non-reentrant mutex for performance # reasons. # - # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:15 def initialize(options = T.unsafe(nil), &default_proc); end @@ -2911,8 +2562,6 @@ class Concurrent::Collection::NonConcurrentMapBackend # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:110 def get_or_default(key, default_value); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:77 def key?(key); end @@ -2936,8 +2585,6 @@ class Concurrent::Collection::NonConcurrentMapBackend # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:124 def initialize_copy(other); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:134 def pair?(key, expected_value); end @@ -2948,31 +2595,38 @@ class Concurrent::Collection::NonConcurrentMapBackend def store_computed_value(key, new_value); end end -# A queue collection in which the elements are sorted based on their -# comparison (spaceship) operator `<=>`. Items are added to the queue -# at a position relative to their priority. On removal the element -# with the "highest" priority is removed. By default the sort order is -# from highest to lowest, but a lowest-to-highest sort order can be -# set on construction. +# @!macro priority_queue +# +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. # -# The API is based on the `Queue` class from the Ruby standard library. +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. # -# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm -# stored in an array. The algorithm is based on the work of Robert Sedgewick -# and Kevin Wayne. +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. # -# The JRuby native implementation is a thin wrapper around the standard -# library `java.util.NonConcurrentPriorityQueue`. +# @note This implementation is *not* thread safe. # -# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. -# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html # -# @note This implementation is *not* thread safe. -# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html -# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 -# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html -# @see http://en.wikipedia.org/wiki/Priority_queue -# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:50 class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue @@ -2995,151 +2649,79 @@ class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collect def size; end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:10 Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue -# A queue collection in which the elements are sorted based on their -# comparison (spaceship) operator `<=>`. Items are added to the queue -# at a position relative to their priority. On removal the element -# with the "highest" priority is removed. By default the sort order is -# from highest to lowest, but a lowest-to-highest sort order can be -# set on construction. -# -# The API is based on the `Queue` class from the Ruby standard library. +# @!macro priority_queue # -# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm -# stored in an array. The algorithm is based on the work of Robert Sedgewick -# and Kevin Wayne. -# -# The JRuby native implementation is a thin wrapper around the standard -# library `java.util.NonConcurrentPriorityQueue`. -# -# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. -# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. -# -# @note This implementation is *not* thread safe. -# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html -# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 -# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html -# @see http://en.wikipedia.org/wiki/Priority_queue -# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @!visibility private +# @!macro internal_implementation_note # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:8 class Concurrent::Collection::RubyNonConcurrentPriorityQueue - # Create a new priority queue with no items. - # - # @option opts - # @param opts [Hash] the options for creating the queue - # @return [RubyNonConcurrentPriorityQueue] a new instance of RubyNonConcurrentPriorityQueue + # @!macro priority_queue_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:11 def initialize(opts = T.unsafe(nil)); end - # Inserts the specified element into this priority queue. - # - # @param item [Object] the item to insert onto the queue - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:85 def <<(item); end - # Removes all of the elements from this priority queue. + # @!macro priority_queue_method_clear # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:18 def clear; end - # Deletes all items from `self` that are equal to `item`. - # - # @param item [Object] the item to be removed from the queue - # @return [Object] true if the item is found else false + # @!macro priority_queue_method_delete # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:25 def delete(item); end - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:74 def deq; end - # Returns `true` if `self` contains no elements. - # - # @return [Boolean] true if there are no items in the queue else false + # @!macro priority_queue_method_empty # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:43 def empty?; end - # Inserts the specified element into this priority queue. - # - # @param item [Object] the item to insert onto the queue - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:86 def enq(item); end - # Returns `true` if the given item is present in `self` (that is, if any - # element == `item`), otherwise returns false. - # - # @param item [Object] the item to search for - # @return [Boolean] true if the item is found else false - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:51 def has_priority?(item); end - # Returns `true` if the given item is present in `self` (that is, if any - # element == `item`), otherwise returns false. - # - # @param item [Object] the item to search for - # @return [Boolean] true if the item is found else false + # @!macro priority_queue_method_include # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:48 def include?(item); end - # The current length of the queue. - # - # @return [Fixnum] the number of items in the queue + # @!macro priority_queue_method_length # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:54 def length; end - # Retrieves, but does not remove, the head of this queue, or returns `nil` - # if this queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty + # @!macro priority_queue_method_peek # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:60 def peek; end - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty + # @!macro priority_queue_method_pop # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:65 def pop; end - # Inserts the specified element into this priority queue. - # - # @param item [Object] the item to insert onto the queue - # @raise [ArgumentError] + # @!macro priority_queue_method_push # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:78 def push(item); end - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:75 def shift; end - # The current length of the queue. - # - # @return [Fixnum] the number of items in the queue - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:57 def size; end @@ -3148,53 +2730,71 @@ class Concurrent::Collection::RubyNonConcurrentPriorityQueue # Are the items at the given indexes ordered based on the priority # order specified at construction? # - # @param x [Integer] the first index from which to retrieve a comparable value - # @param y [Integer] the second index from which to retrieve a comparable value + # @param [Integer] x the first index from which to retrieve a comparable value + # @param [Integer] y the second index from which to retrieve a comparable value + # # @return [Boolean] true if the two elements are in the correct priority order # else false # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:119 def ordered?(x, y); end # Percolate down to maintain heap invariant. # - # @param k [Integer] the index at which to start the percolation + # @param [Integer] k the index at which to start the percolation + # + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:128 def sink(k); end # Exchange the values at the given indexes within the internal array. # - # @param x [Integer] the first index to swap - # @param y [Integer] the second index to swap + # @param [Integer] x the first index to swap + # @param [Integer] y the second index to swap + # + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:103 def swap(x, y); end # Percolate up to maintain heap invariant. # - # @param k [Integer] the index at which to start the percolation + # @param [Integer] k the index at which to start the percolation + # + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:147 def swim(k); end class << self - # @!macro priority_queue_method_from_list + # @!macro priority_queue_method_from_list # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:89 def from_list(list, opts = T.unsafe(nil)); end end end +# @!visibility private +# @!macro timeout_queue +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/timeout_queue.rb:15 class Concurrent::Collection::TimeoutQueue < ::Thread::Queue; end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/timeout_queue.rb:5 Concurrent::Collection::TimeoutQueueImplementation = Thread::Queue # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:2 module Concurrent::Concern; end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/deprecation.rb:8 module Concurrent::Concern::Deprecation include ::Concurrent::Concern::Logging @@ -3214,13 +2814,10 @@ end # Most classes in this library that expose a `#value` getter method do so using the # `Dereferenceable` mixin module. # +# @!macro copy_options +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:11 module Concurrent::Concern::Dereferenceable - # Return the value this object represents after applying the options specified - # by the `#set_deref_options` method. - # - # @return [Object] the current value of the object - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:24 def deref; end @@ -3234,40 +2831,37 @@ module Concurrent::Concern::Dereferenceable protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:63 def apply_deref_options(value); end - # Set the options which define the operations #value performs before - # returning data to the caller (dereferencing). - # - # @note Most classes that include this module will call `#set_deref_options` - # from within the constructor, thus allowing these options to be set at - # object creation. - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining dereference behavior. + # @!macro dereferenceable_set_deref_options + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:54 def ns_set_deref_options(opts); end - # Set the options which define the operations #value performs before - # returning data to the caller (dereferencing). + # @!macro dereferenceable_set_deref_options + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. # - # @note Most classes that include this module will call `#set_deref_options` - # from within the constructor, thus allowing these options to be set at - # object creation. - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining dereference behavior. + # @param [Hash] opts the options defining dereference behavior. + # @option opts [String] :dup_on_deref (false) call `#dup` before returning the data + # @option opts [String] :freeze_on_deref (false) call `#freeze` before returning the data + # @option opts [String] :copy_on_deref (nil) call the given `Proc` passing + # the internal value and returning the value returned from the proc # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:48 def set_deref_options(opts = T.unsafe(nil)); end # Set the internal value of this object # - # @param value [Object] the new value + # @param [Object] value the new value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:31 def value=(value); end @@ -3275,19 +2869,22 @@ end # Include where logging is needed # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:9 module Concurrent::Concern::Logging # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger - # - # @param level [Integer] one of Concurrent::Concern::Logging constants - # @param message [String, nil] when nil block is used to generate the message - # @param progname [String] e.g. a path of an Actor + # @param [Integer] level one of Concurrent::Concern::Logging constants + # @param [String] progname e.g. a path of an Actor + # @param [String, nil] message when nil block is used to generate the message # @yieldreturn [String] a message # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:19 def log(level, progname, message = T.unsafe(nil), &block); end end +# The same as Logger::Severity but we copy it here to avoid a dependency on the logger gem just for these 7 constants +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 Concurrent::Concern::Logging::DEBUG = T.let(T.unsafe(nil), Integer) @@ -3341,14 +2938,6 @@ module Concurrent::Concern::Obligation # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:56 def incomplete?; end - # Wait until obligation is complete or the timeout is reached. Will re-raise - # any exceptions raised during processing (but will not raise an exception - # on timeout). - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @raise [Exception] raises the reason when rejected - # @return [Obligation] self - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:89 def no_error!(timeout = T.unsafe(nil)); end @@ -3359,10 +2948,6 @@ module Concurrent::Concern::Obligation # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:35 def pending?; end - # Has the obligation been fulfilled? - # - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:23 def realized?; end @@ -3399,7 +2984,7 @@ module Concurrent::Concern::Obligation # The current value of the obligation. Will be `nil` while the state is # pending or the operation has been rejected. # - # @param timeout [Numeric] the maximum time in seconds to wait. + # @param [Numeric] timeout the maximum time in seconds to wait. # @return [Object] see Dereferenceable#deref # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:65 @@ -3409,16 +2994,16 @@ module Concurrent::Concern::Obligation # pending or the operation has been rejected. Will re-raise any exceptions # raised during processing (but will not raise an exception on timeout). # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @raise [Exception] raises the reason when rejected + # @param [Numeric] timeout the maximum time in seconds to wait. # @return [Object] see Dereferenceable#deref + # @raise [Exception] raises the reason when rejected # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:98 def value!(timeout = T.unsafe(nil)); end # Wait until obligation is complete or the timeout has been reached. # - # @param timeout [Numeric] the maximum time in seconds to wait. + # @param [Numeric] timeout the maximum time in seconds to wait. # @return [Obligation] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:74 @@ -3428,9 +3013,9 @@ module Concurrent::Concern::Obligation # any exceptions raised during processing (but will not raise an exception # on timeout). # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @raise [Exception] raises the reason when rejected + # @param [Numeric] timeout the maximum time in seconds to wait. # @return [Obligation] self + # @raise [Exception] raises the reason when rejected # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:86 def wait!(timeout = T.unsafe(nil)); end @@ -3440,16 +3025,23 @@ module Concurrent::Concern::Obligation # Atomic compare and set operation # State is set to `next_state` only if `current state == expected_current`. # - # @param expected_current [Symbol] - # @param next_state [Symbol] + # @param [Symbol] next_state + # @param [Symbol] expected_current + # # @return [Boolean] true is state is changed, false otherwise # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:174 def compare_and_set_state(next_state, *expected_current); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:145 def event; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:134 def get_arguments_from(opts = T.unsafe(nil)); end @@ -3457,26 +3049,38 @@ module Concurrent::Concern::Obligation # # @return block value if executed, false otherwise # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:190 def if_state(*expected_states); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:139 def init_obligation; end # Am I in the current state? # - # @param expected [Symbol] The state to check against + # @param [Symbol] expected The state to check against # @return [Boolean] true if in the expected state else false # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:210 def ns_check_state?(expected); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:215 def ns_set_state(value); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:150 def set_state(success, value, reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:161 def state=(value); end end @@ -3527,44 +3131,52 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:50 module Concurrent::Concern::Observable - # Adds an observer to this set. If a block is passed, the observer will be - # created by this method and no other params should be passed. + # @!macro observable_add_observer # - # @param func [Symbol] the function to call on the observer during notification. - # Default is :update - # @param observer [Object] the observer to add - # @return [Object] the added observer + # Adds an observer to this set. If a block is passed, the observer will be + # created by this method and no other params should be passed. + # + # @param [Object] observer the observer to add + # @param [Symbol] func the function to call on the observer during notification. + # Default is :update + # @return [Object] the added observer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:61 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - # Return the number of observers associated with this object. + # @!macro observable_count_observers + # + # Return the number of observers associated with this object. # - # @return [Integer] the observers count + # @return [Integer] the observers count # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:101 def count_observers; end - # Remove `observer` as an observer on this object so that it will no - # longer receive notifications. + # @!macro observable_delete_observer # - # @param observer [Object] the observer to remove - # @return [Object] the deleted observer + # Remove `observer` as an observer on this object so that it will no + # longer receive notifications. + # + # @param [Object] observer the observer to remove + # @return [Object] the deleted observer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:82 def delete_observer(observer); end - # Remove all observers associated with this object. + # @!macro observable_delete_observers # - # @return [Observable] self + # Remove all observers associated with this object. + # + # @return [Observable] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:91 def delete_observers; end # As `#add_observer` but can be used for chaining. # - # @param func [Symbol] the function to call on the observer during notification. - # @param observer [Object] the observer to add + # @param [Object] observer the observer to add + # @param [Symbol] func the function to call on the observer during notification. # @return [Observable] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:70 @@ -3572,19 +3184,15 @@ module Concurrent::Concern::Observable protected - # Returns the value of attribute observers. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:107 def observers; end - # Sets the attribute observers - # - # @param value the value to set the attribute observers to. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:107 def observers=(_arg0); end end +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:70 class Concurrent::ConcurrentUpdateError < ::ThreadError; end @@ -3598,34 +3206,37 @@ Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:6 class Concurrent::ConfigurationError < ::Concurrent::Error; end -# A synchronization object that allows one thread to wait on multiple other threads. -# The thread that will wait creates a `CountDownLatch` and sets the initial value -# (normally equal to the number of other threads). The initiating thread passes the -# latch to the other threads then waits for the other threads by calling the `#wait` -# method. Each of the other threads calls `#count_down` when done with its work. -# When the latch counter reaches zero the waiting thread is unblocked and continues -# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# @!macro count_down_latch +# +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. # +# @!macro count_down_latch_public_api # @example Waiter and Decrementer # latch = Concurrent::CountDownLatch.new(3) # # waiter = Thread.new do -# latch.wait() -# puts ("Waiter released") +# latch.wait() +# puts ("Waiter released") # end # # decrementer = Thread.new do -# sleep(1) -# latch.count_down -# puts latch.count +# sleep(1) +# latch.count_down +# puts latch.count # -# sleep(1) -# latch.count_down -# puts latch.count +# sleep(1) +# latch.count_down +# puts latch.count # -# sleep(1) -# latch.count_down -# puts latch.count +# sleep(1) +# latch.count_down +# puts latch.count # end # # [waiter, decrementer].each(&:join) @@ -3633,25 +3244,27 @@ class Concurrent::ConfigurationError < ::Concurrent::Error; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb:98 class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb:56 Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch # A synchronization aid that allows a set of threads to all wait for each # other to reach a common barrier point. -# # @example # barrier = Concurrent::CyclicBarrier.new(3) # jobs = Array.new(3) { |i| -> { sleep i; p done: i } } # process = -> (i) do -# # waiting to start at the same time -# barrier.wait -# # execute job -# jobs[i].call -# # wait for others to finish -# barrier.wait +# # waiting to start at the same time +# barrier.wait +# # execute job +# jobs[i].call +# # wait for others to finish +# barrier.wait # end # threads = 2.times.map do |i| -# Thread.new(i, &process) +# Thread.new(i, &process) # end # # # use main as well @@ -3663,11 +3276,11 @@ Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject # Create a new `CyclicBarrier` that waits for `parties` threads # - # @param parties [Fixnum] the number of parties - # @raise [ArgumentError] if `parties` is not an integer or is less than zero - # @return [CyclicBarrier] a new instance of CyclicBarrier + # @param [Fixnum] parties the number of parties # @yield an optional block that will be executed that will be executed after - # the last thread arrives and before the others are released + # the last thread arrives and before the others are released + # + # @raise [ArgumentError] if `parties` is not an integer or is less than zero # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:40 def initialize(parties, &block); end @@ -3677,7 +3290,6 @@ class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject # - at least one thread timed out on `wait` method # # A broken barrier can be restored using `reset` it's safer to create a new one - # # @return [Boolean] true if the barrier is broken otherwise false # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:105 @@ -3707,11 +3319,10 @@ class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject # `parties` or until `timeout` is reached or `reset` is called # If a block has been passed to the constructor, it will be executed once by # the last arrived thread before releasing the others - # - # @param timeout [Fixnum] the number of seconds to wait for the counter or - # `nil` to block indefinitely + # @param [Fixnum] timeout the number of seconds to wait for the counter or + # `nil` to block indefinitely # @return [Boolean] `true` if the `count` reaches zero else false on - # `timeout` or on `reset` or if the barrier is broken + # `timeout` or on `reset` or if the barrier is broken # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:66 def wait(timeout = T.unsafe(nil)); end @@ -3728,20 +3339,13 @@ class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject def ns_next_generation; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 class Concurrent::CyclicBarrier::Generation < ::Struct - # Returns the value of attribute status - # - # @return [Object] the current value of status - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 def status; end - # Sets the attribute status - # - # @param value [Object] the value to set the attribute status to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 def status=(_); end @@ -3785,12 +3389,16 @@ end # `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread # safety of the reference returned by `#value`. # -# @note The default behavior of `Delay` is to block indefinitely when -# calling either `value` or `wait`, executing the delayed operation on -# the current thread. This makes the `timeout` value completely -# irrelevant. To enable non-blocking behavior, use the `executor` -# constructor option. This will cause the delayed operation to be -# execute on the given executor, allowing the call to timeout. +# @!macro copy_options +# +# @!macro delay_note_regarding_blocking +# @note The default behavior of `Delay` is to block indefinitely when +# calling either `value` or `wait`, executing the delayed operation on +# the current thread. This makes the `timeout` value completely +# irrelevant. To enable non-blocking behavior, use the `executor` +# constructor option. This will cause the delayed operation to be +# execute on the given executor, allowing the call to timeout. +# # @see Concurrent::Concern::Dereferenceable # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:44 @@ -3800,17 +3408,19 @@ class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject # Create a new `Delay` in the `:pending` state. # - # @raise [ArgumentError] if no block is given - # @return [Delay] a new instance of Delay + # @!macro executor_and_deref_options + # # @yield the delayed operation to perform # + # @raise [ArgumentError] if no block is given + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:62 def initialize(opts = T.unsafe(nil), &block); end # Reconfigures the block returning the value if still `#incomplete?` # - # @return [true, false] if success # @yield the delayed operation to perform + # @return [true, false] if success # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:146 def reconfigure(&block); end @@ -3820,15 +3430,11 @@ class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject # raised an exception this method will return nil. The exception object # can be accessed via the `#reason` method. # - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # @param timeout [Numeric] the maximum number of seconds to wait + # @param [Numeric] timeout the maximum number of seconds to wait # @return [Object] the current value of the object # + # @!macro delay_note_regarding_blocking + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:77 def value(timeout = T.unsafe(nil)); end @@ -3837,15 +3443,11 @@ class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject # raised an exception, this method will raise that exception (even when) # the operation has already been executed). # - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # @param timeout [Numeric] the maximum number of seconds to wait - # @raise [Exception] when `#rejected?` raises `#reason` + # @param [Numeric] timeout the maximum number of seconds to wait # @return [Object] the current value of the object + # @raise [Exception] when `#rejected?` raises `#reason` + # + # @!macro delay_note_regarding_blocking # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:113 def value!(timeout = T.unsafe(nil)); end @@ -3853,16 +3455,13 @@ class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject # Return the value this object represents after applying the options # specified by the `#set_deref_options` method. # - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # @param timeout [Integer] (nil) the maximum number of seconds to wait for + # @param [Integer] timeout (nil) the maximum number of seconds to wait for # the value to be computed. When `nil` the caller will block indefinitely. + # # @return [Object] self # + # @!macro delay_note_regarding_blocking + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:132 def wait(timeout = T.unsafe(nil)); end @@ -3873,14 +3472,16 @@ class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:173 def execute_task_once; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:7 class Concurrent::DependencyCounter - # @return [DependencyCounter] a new instance of DependencyCounter - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:9 def initialize(count, &block); end @@ -3900,18 +3501,19 @@ class Concurrent::Error < ::StandardError; end # New threads calling `#wait` will return immediately. An `Event` may be # `#reset` at any time once it has been set. # +# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx # @example # event = Concurrent::Event.new # # t1 = Thread.new do -# puts "t1 is waiting" -# event.wait(1) -# puts "event occurred" +# puts "t1 is waiting" +# event.wait(1) +# puts "event occurred" # end # # t2 = Thread.new do -# puts "t2 calling set" -# event.set +# puts "t2 calling set" +# event.set # end # # [t1, t2].each(&:join) @@ -3920,15 +3522,12 @@ class Concurrent::Error < ::StandardError; end # # t1 is waiting # # t2 calling set # # event occurred -# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:36 class Concurrent::Event < ::Concurrent::Synchronization::LockableObject # Creates a new `Event` in the unset state. Threads calling `#wait` on the # `Event` will block. # - # @return [Event] a new instance of Event - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:40 def initialize; end @@ -3955,8 +3554,6 @@ class Concurrent::Event < ::Concurrent::Synchronization::LockableObject # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:48 def set?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:60 def try?; end @@ -3978,103 +3575,44 @@ class Concurrent::Event < ::Concurrent::Synchronization::LockableObject def ns_set; end end -# A synchronization point at which threads can pair and swap elements within -# pairs. Each thread presents some object on entry to the exchange method, -# matches with a partner thread, and receives its partner's object on return. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# This implementation is very simple, using only a single slot for each -# exchanger (unlike more advanced implementations which use an "arena"). -# This approach will work perfectly fine when there are only a few threads -# accessing a single `Exchanger`. Beyond a handful of threads the performance -# will degrade rapidly due to contention on the single slot, but the algorithm -# will remain correct. -# -# @example -# -# exchanger = Concurrent::Exchanger.new -# -# threads = [ -# Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" -# Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" -# ] -# threads.each {|t| t.join(2) } -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger +# @!macro exchanger # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:336 class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:327 Concurrent::ExchangerImplementation = Concurrent::RubyExchanger +# @!macro executor_service_public_api +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:157 module Concurrent::ExecutorService include ::Concurrent::Concern::Logging - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself + # @!macro executor_service_method_left_shift # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:166 def <<(task); end - # Does the task queue have a maximum size? + # @!macro executor_service_method_can_overflow_question # # @note Always returns `false` - # @return [Boolean] True if the task queue has a maximum size else false. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:174 def can_overflow?; end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform + # @!macro executor_service_method_post # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:161 def post(*args, &task); end - # Does this executor guarantee serialization of its operations? + # @!macro executor_service_method_serialized_question # # @note Always returns `false` - # @return [Boolean] True if the executor guarantees that all operations - # will be post in the order they are received and no two operations may - # occur simultaneously. Else false. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:181 def serialized?; end @@ -4098,19 +3636,20 @@ end # v.value #=> 14 # v.value = 2 # v.value #=> 2 +# # @example # v = FiberLocalVar.new(14) # # Fiber.new do -# v.value #=> 14 -# v.value = 1 -# v.value #=> 1 +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 # end.resume # # Fiber.new do -# v.value #=> 14 -# v.value = 2 -# v.value #=> 2 +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 # end.resume # # v.value #=> 14 @@ -4119,10 +3658,9 @@ end class Concurrent::FiberLocalVar # Creates a fiber local variable. # - # @param default [Object] the default value when otherwise unset - # @param default_block [Proc] Optional block that gets called to obtain the + # @param [Object] default the default value when otherwise unset + # @param [Proc] default_block Optional block that gets called to obtain the # default value for each fiber - # @return [FiberLocalVar] a new instance of FiberLocalVar # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:49 def initialize(default = T.unsafe(nil), &default_block); end @@ -4130,9 +3668,9 @@ class Concurrent::FiberLocalVar # Bind the given value to fiber local storage during # execution of the given block. # - # @param value [Object] the value to bind - # @return [Object] the value + # @param [Object] value the value to bind # @yield the operation to be performed with the bound variable + # @return [Object] the value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:86 def bind(value); end @@ -4146,7 +3684,7 @@ class Concurrent::FiberLocalVar # Sets the current fiber's copy of this fiber-local variable to the specified value. # - # @param value [Object] the value to set + # @param [Object] value the value to set # @return [Object] the new value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:76 @@ -4154,6 +3692,8 @@ class Concurrent::FiberLocalVar protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:101 def default; end end @@ -4161,6 +3701,8 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:42 Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) +# @!visibility private +# @!macro internal_implementation_note # An array-backed storage of indexed variables per fiber. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:166 @@ -4172,76 +3714,32 @@ class Concurrent::FiberLocals < ::Concurrent::AbstractLocals def locals!; end end -# A thread pool that reuses a fixed number of threads operating off an unbounded queue. -# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new -# tasks `#post` to the thread pool are enqueued until a thread becomes available. -# Should a thread crash for any reason the thread will immediately be removed -# from the pool and replaced. -# -# The API and behavior of this class are based on Java's `FixedThreadPool` -# -# **Thread Pool Options** -# -# Thread pools support several configuration options: -# -# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. -# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and -# a `-worker-` name is given to its threads if supported by used Ruby -# implementation. `` is uniq for each thread. -# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at -# any one time. When the queue size reaches `max_queue` and no new threads can be created, -# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. -# * `auto_terminate`: When true (default), the threads started will be marked as daemon. -# * `fallback_policy`: The policy defining how rejected tasks are handled. -# -# Three fallback policies are supported: +# @!macro fixed_thread_pool # -# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. -# * `:discard`: Discard the task and return false. -# * `:caller_runs`: Execute the task on the calling thread. +# A thread pool that reuses a fixed number of threads operating off an unbounded queue. +# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new +# tasks `#post` to the thread pool are enqueued until a thread becomes available. +# Should a thread crash for any reason the thread will immediately be removed +# from the pool and replaced. # -# **Shutting Down Thread Pools** +# The API and behavior of this class are based on Java's `FixedThreadPool` # -# Killing a thread pool while tasks are still being processed, either by calling -# the `#kill` method or at application exit, will have unpredictable results. There -# is no way for the thread pool to know what resources are being used by the -# in-progress tasks. When those tasks are killed the impact on those resources -# cannot be predicted. The *best* practice is to explicitly shutdown all thread -# pools using the provided methods: -# -# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks -# * Call `#wait_for_termination` with an appropriate timeout interval an allow -# the orderly shutdown to complete -# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time -# -# On some runtime platforms (most notably the JVM) the application will not -# exit until all thread pools have been shutdown. To prevent applications from -# "hanging" on exit, all threads can be marked as daemon according to the -# `:auto_terminate` option. -# -# ```ruby -# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon -# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon -# ``` -# -# @note Failure to properly shutdown a thread pool can lead to unpredictable results. -# Please read *Shutting Down Thread Pools* for more information. -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface -# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools -# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# @!macro thread_pool_options # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb:199 class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor - # Create a new thread pool. + # @!macro fixed_thread_pool_method_initialize + # + # Create a new thread pool. # - # @option opts - # @param num_threads [Integer] the number of threads to allocate - # @param opts [Hash] the options defining pool behavior. - # @raise [ArgumentError] if `num_threads` is less than or equal to zero - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # @return [FixedThreadPool] a new instance of FixedThreadPool - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- + # @param [Integer] num_threads the number of threads to allocate + # @param [Hash] opts the options defining pool behavior. + # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy + # + # @raise [ArgumentError] if `num_threads` is less than or equal to zero + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb:213 def initialize(num_threads, opts = T.unsafe(nil)); end @@ -4249,20 +3747,25 @@ end # {include:file:docs-source/future.md} # +# @!macro copy_options +# +# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module # @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future -# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:21 class Concurrent::Future < ::Concurrent::IVar # Create a new `Future` in the `:unscheduled` state. # - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Future] a new instance of Future # @yield the asynchronous operation to perform # + # @!macro executor_and_deref_options + # + # @option opts [object, Array] :args zero or more arguments to be passed the task + # block on execution + # + # @raise [ArgumentError] if no block is given + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:33 def initialize(opts = T.unsafe(nil), &block); end @@ -4286,26 +3789,30 @@ class Concurrent::Future < ::Concurrent::IVar # passes the block to a new thread/thread pool for eventual execution. # Does nothing if the `Future` is in any state other than `:unscheduled`. # - # @example Instance and execute in one line - # future = Concurrent::Future.new{ sleep(1); 42 }.execute - # future.state #=> :pending + # @return [Future] a reference to `self` + # # @example Instance and execute in separate steps # future = Concurrent::Future.new{ sleep(1); 42 } # future.state #=> :unscheduled # future.execute # future.state #=> :pending - # @return [Future] a reference to `self` + # + # @example Instance and execute in one line + # future = Concurrent::Future.new{ sleep(1); 42 }.execute + # future.state #=> :pending # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:53 def execute; end + # @!macro ivar_set_method + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:82 def set(value = T.unsafe(nil), &block); end # Wait the given number of seconds for the operation to complete. # On timeout attempt to cancel the operation. # - # @param timeout [Numeric] the maximum time in seconds to wait. + # @param [Numeric] timeout the maximum time in seconds to wait. # @return [Boolean] true if the operation completed before the timeout # else false # @@ -4321,45 +3828,58 @@ class Concurrent::Future < ::Concurrent::IVar # Create a new `Future` object with the given block, execute it, and return the # `:pending` object. # + # @yield the asynchronous operation to perform + # + # @!macro executor_and_deref_options + # + # @option opts [object, Array] :args zero or more arguments to be passed the task + # block on execution + # + # @raise [ArgumentError] if no block is given + # + # @return [Future] the newly created `Future` in the `:pending` state + # # @example # future = Concurrent::Future.execute{ sleep(1); 42 } # future.state #=> :pending - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Future] the newly created `Future` in the `:pending` state - # @yield the asynchronous operation to perform # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:77 def execute(opts = T.unsafe(nil), &block); end end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:18 Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:30 Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:22 Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:111 Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:26 Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) -# A thread-safe subclass of Hash. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`, -# which takes the lock repeatedly when reading an item. -# -# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# @!macro concurrent_hash # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/hash.rb:49 class Concurrent::Hash < ::Hash; end +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/hash.rb:16 Concurrent::HashImplementation = Hash @@ -4409,12 +3929,14 @@ class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject # Create a new `IVar` in the `:pending` state with the (optional) initial value. # - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options to create a message with - # @param value [Object] the initial value - # @return [IVar] a new instance of IVar + # @param [Object] value the initial value + # @param [Hash] opts the options to create a message with + # @option opts [String] :dup_on_deref (false) call `#dup` before returning + # the data + # @option opts [String] :freeze_on_deref (false) call `#freeze` before + # returning the data + # @option opts [String] :copy_on_deref (nil) call the given `Proc` passing + # the internal value and returning the value returned from the proc # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:62 def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end @@ -4427,32 +3949,35 @@ class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on # fulfillment). # - # @param func [Symbol] symbol naming the method to call when this + # @param [Object] observer the object that will be notified of changes + # @param [Symbol] func symbol naming the method to call when this # `Observable` has changes` - # @param observer [Object] the object that will be notified of changes - # @raise [ArgumentError] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:81 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # @!macro ivar_fail_method + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. # - # @param reason [Object] for the failure - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @return [IVar] self + # @param [Object] reason for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:135 def fail(reason = T.unsafe(nil)); end - # Set the `IVar` to a value and wake or notify all threads waiting on it. + # @!macro ivar_set_method + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @!macro ivar_set_parameters_and_exceptions + # @param [Object] value the value to store in the `IVar` + # @yield A block operation to use for setting the value + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed # - # @param value [Object] the value to store in the `IVar` - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @return [IVar] self - # @yield A block operation to use for setting the value + # @return [IVar] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:113 def set(value = T.unsafe(nil)); end @@ -4460,38 +3985,47 @@ class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject # Attempt to set the `IVar` with the given value or block. Return a # boolean indicating the success or failure of the set operation. # - # @param value [Object] the value to store in the `IVar` - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed + # @!macro ivar_set_parameters_and_exceptions + # # @return [Boolean] true if the value was set else false - # @yield A block operation to use for setting the value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:145 def try_set(value = T.unsafe(nil), &block); end protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:202 def check_for_block_or_value!(block_given, value); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:177 def complete(success, value, reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:184 def complete_without_notification(success, value, reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:190 def notify_observers(value, reason); end - # @raise [MultipleAssignmentError] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:195 def ns_complete_without_notification(success, value, reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:155 def ns_initialize(value, opts); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:168 def safe_execute(task, args = T.unsafe(nil)); end end @@ -4519,72 +4053,43 @@ class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService # Creates a new executor # - # @return [ImmediateExecutor] a new instance of ImmediateExecutor - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:21 def initialize; end - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself + # @!macro executor_service_method_left_shift # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:34 def <<(task); end - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:59 def kill; end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform + # @!macro executor_service_method_post # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:26 def post(*args, &task); end - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # @!macro executor_service_method_running_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:40 def running?; end - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. + # @!macro executor_service_method_shutdown # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:55 def shutdown; end - # Is the executor shutdown? - # - # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # @!macro executor_service_method_shutdown_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:50 def shutdown?; end - # Is the executor shuttingdown? - # - # @return [Boolean] `true` when not running and not shutdown, else `false` + # @!macro executor_service_method_shuttingdown_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:45 def shuttingdown?; end - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete - # @return [Boolean] `true` if shutdown complete or false on `timeout` + # @!macro executor_service_method_wait_for_termination # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:62 def wait_for_termination(timeout = T.unsafe(nil)); end @@ -4603,53 +4108,75 @@ class Concurrent::ImmutabilityError < ::Concurrent::Error; end module Concurrent::ImmutableStruct include ::Concurrent::Synchronization::AbstractStruct + # @!macro struct_equality + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:51 def ==(other); end + # @!macro struct_get + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:46 def [](member); end + # @!macro struct_each + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:56 def each(&block); end + # @!macro struct_each_pair + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:62 def each_pair(&block); end + # @!macro struct_inspect + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:29 def inspect; end + # @!macro struct_merge + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:36 def merge(other, &block); end + # @!macro struct_select + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:68 def select(&block); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:21 def to_a; end + # @!macro struct_to_h + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:41 def to_h; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:33 def to_s; end + # @!macro struct_values + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:17 def values; end + # @!macro struct_values_at + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:24 def values_at(*indexes); end private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:76 def initialize_copy(original); end class << self - # @private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:12 def included(base); end + # @!macro struct_new + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:82 def new(*args, &block); end end @@ -4677,18 +4204,10 @@ Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor # Creates a new executor # - # @return [IndirectImmediateExecutor] a new instance of IndirectImmediateExecutor - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb:21 def initialize; end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform + # @!macro executor_service_method_post # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb:27 def post(*args, &task); end @@ -4706,13 +4225,14 @@ class Concurrent::InitializationError < ::Concurrent::Error; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:13 class Concurrent::LifecycleError < ::Concurrent::Error; end +# @!macro warn.edge +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:6 class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object include ::Enumerable extend ::Concurrent::Synchronization::SafeInitialization - # @param head [Node] - # @return [LockFreeStack] a new instance of LockFreeStack + # @param [Node] head # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:51 def initialize(head = T.unsafe(nil)); end @@ -4727,50 +4247,48 @@ class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object # @return [self] # @yield over the cleared stack - # @yieldparam value [Object] + # @yieldparam [Object] value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:142 def clear_each(&block); end - # @param head [Node] + # @param [Node] head # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:128 def clear_if(head); end - # @param head [Node] + # @param [Node] head # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:99 def compare_and_clear(head); end - # @param head [Node] + # @param [Node] head # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:85 def compare_and_pop(head); end - # @param head [Node] - # @param value [Object] + # @param [Node] head + # @param [Object] value # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:65 def compare_and_push(head, value); end - # @param head [Node] + # @param [Node] head # @return [self] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:107 def each(head = T.unsafe(nil)); end - # @param head [Node] + # @param [Node] head # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:58 def empty?(head = T.unsafe(nil)); end - # @return [String] Short string representation. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:158 def inspect; end @@ -4784,14 +4302,14 @@ class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:90 def pop; end - # @param value [Object] + # @param [Object] value # @return [self] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:71 def push(value); end - # @param head [Node] - # @param new_head [Node] + # @param [Node] head + # @param [Node] new_head # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:135 @@ -4820,9 +4338,13 @@ class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object def update_head(&block); end class << self + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:41 def of1(value); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:46 def of2(value1, value2); end end @@ -4835,8 +4357,6 @@ Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStac # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:10 class Concurrent::LockFreeStack::Node - # @return [Node] a new instance of Node - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:23 def initialize(value, next_node); end @@ -4846,10 +4366,14 @@ class Concurrent::LockFreeStack::Node def next_node; end # @return [Object] + # @!visibility private + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:17 def value; end + # @return [Object] + # @!visibility private # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:21 @@ -4889,6 +4413,8 @@ Concurrent::LockLocalVar = Concurrent::FiberLocalVar # Note that unlike the original Haskell paper, our `#take` is blocking. This is how # Haskell and Scala do it today. # +# @!macro copy_options +# # ## See Also # # 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th @@ -4905,8 +4431,9 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object # Create a new `MVar`, either empty or with an initial value. # - # @param opts [Hash] the options controlling how the future will be processed - # @return [MVar] a new instance of MVar + # @param [Hash] opts the options controlling how the future will be processed + # + # @!macro deref_options # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:54 def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end @@ -4914,7 +4441,6 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object # acquires lock on the from an `MVAR`, yields the value to provided block, # and release lock. A timeout can be set to limit the time spent blocked, # in which case it returns `TIMEOUT` if the time is exceeded. - # # @return [Object] the value returned by the block, or `TIMEOUT` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:86 @@ -4922,15 +4448,11 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object # Returns if the `MVar` is currently empty. # - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:195 def empty?; end # Returns if the `MVar` currently contains a value. # - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:200 def full?; end @@ -4938,8 +4460,6 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object # `put` the transformed value. Returns the pre-transform value. A timeout can # be set to limit the time spent blocked, in which case it returns `TIMEOUT` # if the time is exceeded. - # - # @raise [ArgumentError] # @return [Object] the pre-transform value, or `TIMEOUT` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:123 @@ -4947,15 +4467,12 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. # - # @raise [ArgumentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:179 def modify!; end # Put a value into an `MVar`, blocking if there is already a value until # it is empty. A timeout can be set to limit the time spent blocked, in # which case it returns `TIMEOUT` if the time is exceeded. - # # @return [Object] the value that was put, or `TIMEOUT` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:103 @@ -4969,7 +4486,6 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object # Remove the value from an `MVar`, leaving it empty, and blocking if there # isn't a value. A timeout can be set to limit the time spent blocked, in # which case it returns `TIMEOUT` if the time is exceeded. - # # @return [Object] the value that was taken, or `TIMEOUT` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:66 @@ -4992,13 +4508,9 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object private - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:212 def unlocked_empty?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:216 def unlocked_full?; end @@ -5032,58 +4544,38 @@ Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:39 class Concurrent::Map < ::Concurrent::Collection::MriMapBackend - # Iterates over each key value pair. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key value pair in the map - # @yieldparam key [Object] - # @yieldparam value [Object] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:279 def each; end # Iterates over each key. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] # @yield for each key in the map # @yieldparam key [Object] + # @return [self] + # @!macro map.atomic_method_with_block # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:255 def each_key; end # Iterates over each key value pair. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] # @yield for each key value pair in the map # @yieldparam key [Object] # @yieldparam value [Object] + # @return [self] + # @!macro map.atomic_method_with_block # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:274 def each_pair; end # Iterates over each value. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] # @yield for each value in the map # @yieldparam value [Object] + # @return [self] + # @!macro map.atomic_method_with_block # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:264 def each_value; end # Is map empty? - # # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:291 @@ -5091,22 +4583,22 @@ class Concurrent::Map < ::Concurrent::Collection::MriMapBackend # Get a value with key, or default_value when key is absent, # or fail when no default_value is given. - # - # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended - # to be use as a concurrency primitive with strong happens-before - # guarantees. It is not intended to be used as a high-level abstraction - # supporting complex operations. All read and write operations are - # thread safe, but no guarantees are made regarding race conditions - # between the fetch operation and yielding to the block. Additionally, - # this method does not support recursion. This is due to internal - # constraints that are very unlikely to change in the near future. - # @param default_value [Object] - # @param key [Object] - # @raise [KeyError] when key is missing and no default_value is provided - # @return [Object] the value or default value + # @param [Object] key + # @param [Object] default_value # @yield default value for a key # @yieldparam key [Object] # @yieldreturn [Object] default value + # @return [Object] the value or default value + # @raise [KeyError] when key is missing and no default_value is provided + # @!macro map_method_not_atomic + # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended + # to be use as a concurrency primitive with strong happens-before + # guarantees. It is not intended to be used as a high-level abstraction + # supporting complex operations. All read and write operations are + # thread safe, but no guarantees are made regarding race conditions + # between the fetch operation and yielding to the block. Additionally, + # this method does not support recursion. This is due to internal + # constraints that are very unlikely to change in the near future. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:183 def fetch(key, default_value = T.unsafe(nil)); end @@ -5115,79 +4607,66 @@ class Concurrent::Map < ::Concurrent::Collection::MriMapBackend # or fail when no default_value is given. This is a two step operation, # therefore not atomic. The store can overwrite other concurrently # stored value. - # - # @param default_value [Object] - # @param key [Object] - # @return [Object] the value or default value + # @param [Object] key + # @param [Object] default_value # @yield default value for a key # @yieldparam key [Object] # @yieldreturn [Object] default value + # @return [Object] the value or default value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:205 def fetch_or_store(key, default_value = T.unsafe(nil)); end - # Get a value with key - # - # @param key [Object] - # @return [Object] the value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:162 def get(key); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:321 def inspect; end # Find key of a value. - # - # @param value [Object] + # @param [Object] value # @return [Object, nil] key or nil when not found # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:284 def key(value); end # All keys - # # @return [::Array] keys # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:236 def keys; end - # @raise [TypeError] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:305 def marshal_dump; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:313 def marshal_load(hash); end - # Set a value with key - # - # @param key [Object] - # @param value [Object] - # @return [Object] the new value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:163 def put(key, value); end # Insert value into map with key if key is absent in one atomic step. - # - # @param key [Object] - # @param value [Object] + # @param [Object] key + # @param [Object] value # @return [Object, nil] the previous value when key was present or nil when there was no key # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:215 def put_if_absent(key, value); end # Is the value stored in the map. Iterates over all values. - # - # @param value [Object] + # @param [Object] value # @return [true, false] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:227 def value?(value); end # All values - # # @return [::Array] values # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:244 @@ -5201,8 +4680,6 @@ class Concurrent::Map < ::Concurrent::Collection::MriMapBackend # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:336 def populate_from(hash); end - # @raise [KeyError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:327 def raise_fetch_no_key; end @@ -5276,14 +4753,14 @@ class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end # # @example Returning a Maybe from a Function # module MyFileUtils -# def self.consult(path) -# file = File.open(path, 'r') -# Concurrent::Maybe.just(file.read) -# rescue => ex -# return Concurrent::Maybe.nothing(ex) -# ensure -# file.close if file -# end +# def self.consult(path) +# file = File.open(path, 'r') +# Concurrent::Maybe.just(file.read) +# rescue => ex +# return Concurrent::Maybe.nothing(ex) +# ensure +# file.close if file +# end # end # # maybe = MyFileUtils.consult('bogus.file') @@ -5295,9 +4772,10 @@ class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end # maybe.just? #=> true # maybe.nothing? #=> false # maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." +# # @example Using Maybe with a Block # result = Concurrent::Maybe.from do -# Client.find(10) # Client is an ActiveRecord model +# Client.find(10) # Client is an ActiveRecord model # end # # # -- if the record was found @@ -5307,12 +4785,14 @@ class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end # # -- if the record was not found # result.just? #=> false # result.reason #=> ActiveRecord::RecordNotFound +# # @example Using Maybe with the Null Object Pattern # # In a Rails controller... # result = ClientService.new(10).find # returns a Maybe # render json: result.or(NullClient.new) -# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe +# # @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe +# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:104 class Concurrent::Maybe < ::Concurrent::Synchronization::Object @@ -5321,10 +4801,13 @@ class Concurrent::Maybe < ::Concurrent::Synchronization::Object # Create a new `Maybe` with the given attributes. # - # @param just [Object] The value when `Just` else `NONE`. - # @param nothing [Exception, Object] The exception when `Nothing` else `NONE`. + # @param [Object] just The value when `Just` else `NONE`. + # @param [Exception, Object] nothing The exception when `Nothing` else `NONE`. + # # @return [Maybe] The new `Maybe`. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:224 def initialize(just, nothing); end @@ -5338,10 +4821,6 @@ class Concurrent::Maybe < ::Concurrent::Synchronization::Object # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:199 def <=>(other); end - # Is this `Maybe` a `Just` (successfully fulfilled with a value)? - # - # @return [Boolean] True if `Just` or false if `Nothing`. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:179 def fulfilled?; end @@ -5376,20 +4855,12 @@ class Concurrent::Maybe < ::Concurrent::Synchronization::Object # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:210 def or(other); end - # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:191 def reason; end - # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? - # - # @return [Boolean] True if `Nothing` or false if `Just`. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:187 def rejected?; end - # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:189 def value; end @@ -5402,19 +4873,22 @@ class Concurrent::Maybe < ::Concurrent::Synchronization::Object # block. If the block raises an exception a new `Nothing` is created with # the reason being set to the raised exception. # - # @param args [Array] Zero or more arguments to pass to the block. - # @raise [ArgumentError] when no block given. - # @return [Maybe] The newly created object. + # @param [Array] args Zero or more arguments to pass to the block. # @yield The block from which to create a new `Maybe`. - # @yieldparam args [Array] Zero or more block arguments passed as + # @yieldparam [Array] args Zero or more block arguments passed as # arguments to the function. # + # @return [Maybe] The newly created object. + # + # @raise [ArgumentError] when no block given. + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:137 def from(*args); end # Create a new `Just` with the given value. # - # @param value [Object] The value to set for the new `Maybe` object. + # @param [Object] value The value to set for the new `Maybe` object. + # # @return [Maybe] The newly created object. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:152 @@ -5422,10 +4896,11 @@ class Concurrent::Maybe < ::Concurrent::Synchronization::Object # Create a new `Nothing` with the given (optional) reason. # - # @param error [Exception] The reason to set for the new `Maybe` object. + # @param [Exception] error The reason to set for the new `Maybe` object. # When given a string a new `StandardError` will be created with the # argument as the message. When no argument is given a new # `StandardError` with an empty message will be created. + # # @return [Maybe] The newly created object. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:164 @@ -5450,16 +4925,12 @@ Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:33 class Concurrent::MultipleAssignmentError < ::Concurrent::Error - # @return [MultipleAssignmentError] a new instance of MultipleAssignmentError - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:36 def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:41 def inspect; end - # Returns the value of attribute inspection_data. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:34 def inspection_data; end end @@ -5468,13 +4939,9 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:58 class Concurrent::MultipleErrors < ::Concurrent::Error - # @return [MultipleErrors] a new instance of MultipleErrors - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:61 def initialize(errors, message = T.unsafe(nil)); end - # Returns the value of attribute errors. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:59 def errors; end end @@ -5488,164 +4955,159 @@ end module Concurrent::MutableStruct include ::Concurrent::Synchronization::AbstractStruct - # Equality + # @!macro struct_equality + # + # Equality # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:128 def ==(other); end - # Attribute Reference + # @!macro struct_get # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. + # Attribute Reference + # + # @param [Symbol, String, Integer] member the string or symbol name of the member + # for which to obtain the value or the member's index + # + # @return [Object] the value of the given struct member or the member at the given index. + # + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:118 def [](member); end - # Attribute Assignment + # @!macro struct_set + # + # Attribute Assignment # - # Sets the value of the given struct member or the member at the given index. + # Sets the value of the given struct member or the member at the given index. # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the name does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. + # @param [Symbol, String, Integer] member the string or symbol name of the member + # for which to obtain the value or the member's index + # + # @return [Object] the value of the given struct member or the member at the given index. + # + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:185 def []=(member, value); end - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. + # @!macro struct_each # - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam [Object] value each struct value (in order) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:139 def each(&block); end - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. + # @!macro struct_each_pair + # + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam member [Object] each struct member (in order) - # @yieldparam value [Object] each struct value (in order) + # @yield the operation to be performed on each struct member/value pair + # @yieldparam [Object] member each struct member (in order) + # @yieldparam [Object] value each struct value (in order) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:152 def each_pair(&block); end - # Describe the contents of this struct in a string. + # @!macro struct_inspect # - # @return [String] the contents of this struct in a string + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:72 def inspect; end - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. + # @!macro struct_merge + # + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param [Hash] other the hash from which to set the new values + # @yield an options block for resolving duplicate keys + # @yieldparam [String, Symbol] member the name of the member which is duplicated + # @yieldparam [Object] selfvalue the value of the member in `self` + # @yieldparam [Object] othervalue the value of the member in `other` + # + # @return [Synchronization::AbstractStruct] a new struct with the new values # - # @param other [Hash] the hash from which to set the new values - # @raise [ArgumentError] of given a member that is not defined in the struct - # @return [Synchronization::AbstractStruct] a new struct with the new values - # @yield an options block for resolving duplicate keys - # @yieldparam member [String, Symbol] the name of the member which is duplicated - # @yieldparam othervalue [Object] the value of the member in `other` - # @yieldparam selfvalue [Object] the value of the member in `self` + # @raise [ArgumentError] of given a member that is not defined in the struct # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:94 def merge(other, &block); end - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). + # @!macro struct_select # - # @return [Array] an array containing each value for which the block returns true - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @yield the operation to be performed on each struct member + # @yieldparam [Object] value each struct value (in order) + # + # @return [Array] an array containing each value for which the block returns true # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:167 def select(&block); end - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:54 def to_a; end - # Returns a hash containing the names and values for the struct’s members. + # @!macro struct_to_h # - # @return [Hash] the names and values for the struct’s members + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:103 def to_h; end - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:75 def to_s; end - # Returns the values for this struct as an Array. + # @!macro struct_values + # + # Returns the values for this struct as an Array. # - # @return [Array] the values for this struct + # @return [Array] the values for this struct # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:51 def values; end - # Returns the struct member values for each selector as an Array. + # @!macro struct_values_at # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # Returns the struct member values for each selector as an Array. # - # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param [Fixnum, Range] indexes the index(es) from which to obatin the values (in order) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:63 def values_at(*indexes); end private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:202 def initialize_copy(original); end class << self - # Factory for creating new struct classes. - # - # ``` - # new([class_name] [, member_name]+>) -> StructClass click to toggle source - # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass - # new(value, ...) -> obj - # StructClass[value, ...] -> obj - # ``` - # - # The first two forms are used to create a new struct subclass `class_name` - # that can contain a value for each member_name . This subclass can be - # used to create instances of the structure like any other Class . - # - # If the `class_name` is omitted an anonymous struct class will be created. - # Otherwise, the name of this struct will appear as a constant in the struct class, - # so it must be unique for all structs under this base class and must start with a - # capital letter. Assigning a struct class to a constant also gives the class - # the name of the constant. - # - # If a block is given it will be evaluated in the context of `StructClass`, passing - # the created class as a parameter. This is the recommended way to customize a struct. - # Subclassing an anonymous struct creates an extra anonymous class that will never be used. - # - # The last two forms create a new instance of a struct subclass. The number of value - # parameters must be less than or equal to the number of attributes defined for the - # struct. Unset parameters default to nil. Passing more parameters than number of attributes - # will raise an `ArgumentError`. - # - # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # @!macro struct_new # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:210 def new(*args, &block); end @@ -5655,294 +5117,143 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:220 Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) -# A boolean value that can be updated atomically. Reads and writes to an atomic -# boolean and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: -# -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicBoolean... -# 2.790000 0.000000 2.790000 ( 2.791454) -# Testing with Concurrent::CAtomicBoolean... -# 0.740000 0.000000 0.740000 ( 0.740206) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicBoolean... -# 5.240000 2.520000 7.760000 ( 3.683000) -# Testing with Concurrent::JavaAtomicBoolean... -# 3.340000 0.010000 3.350000 ( 0.855000) -# ``` -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# @!macro atomic_boolean +# @!visibility private +# @!macro internal_implementation_note # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:8 class Concurrent::MutexAtomicBoolean extend ::Concurrent::Synchronization::SafeInitialization - # Creates a new `AtomicBoolean` with the given initial value. - # - # @param initial [Boolean] the initial value - # @return [MutexAtomicBoolean] a new instance of MutexAtomicBoolean + # @!macro atomic_boolean_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:12 def initialize(initial = T.unsafe(nil)); end - # Is the current value `false` - # - # @return [Boolean] true if the current value is `false`, else false + # @!macro atomic_boolean_method_false_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:34 def false?; end - # Explicitly sets the value to false. - # - # @return [Boolean] true if value has changed, otherwise false + # @!macro atomic_boolean_method_make_false # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:44 def make_false; end - # Explicitly sets the value to true. - # - # @return [Boolean] true if value has changed, otherwise false + # @!macro atomic_boolean_method_make_true # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:39 def make_true; end - # Is the current value `true` - # - # @return [Boolean] true if the current value is `true`, else false + # @!macro atomic_boolean_method_true_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:29 def true?; end - # Retrieves the current `Boolean` value. - # - # @return [Boolean] the current value + # @!macro atomic_boolean_method_value_get # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:19 def value; end - # Explicitly sets the value. - # - # @param value [Boolean] the new value to be set - # @return [Boolean] the current value + # @!macro atomic_boolean_method_value_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:24 def value=(value); end protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:51 def synchronize; end private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:62 def ns_make_value(value); end end -# A numeric value that can be updated atomically. Reads and writes to an atomic -# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: -# -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicFixnum... -# 3.130000 0.000000 3.130000 ( 3.136505) -# Testing with Concurrent::CAtomicFixnum... -# 0.790000 0.000000 0.790000 ( 0.785550) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicFixnum... -# 5.460000 2.460000 7.920000 ( 3.715000) -# Testing with Concurrent::JavaAtomicFixnum... -# 4.520000 0.030000 4.550000 ( 1.187000) -# ``` -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# @!macro atomic_fixnum +# @!visibility private +# @!macro internal_implementation_note # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:9 class Concurrent::MutexAtomicFixnum extend ::Concurrent::Synchronization::SafeInitialization - # Creates a new `AtomicFixnum` with the given initial value. - # - # @param initial [Fixnum] the initial value - # @raise [ArgumentError] if the initial value is not a `Fixnum` - # @return [MutexAtomicFixnum] a new instance of MutexAtomicFixnum + # @!macro atomic_fixnum_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:13 def initialize(initial = T.unsafe(nil)); end - # Atomically sets the value to the given updated value if the current - # value == the expected value. - # - # @param expect [Fixnum] the expected value - # @param update [Fixnum] the new value - # @return [Boolean] true if the value was updated else false + # @!macro atomic_fixnum_method_compare_and_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:44 def compare_and_set(expect, update); end - # Decreases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to decrease the current value - # @return [Fixnum] the current value after decrementation + # @!macro atomic_fixnum_method_decrement # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:37 def decrement(delta = T.unsafe(nil)); end - # Decreases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to decrease the current value - # @return [Fixnum] the current value after decrementation - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:41 def down(delta = T.unsafe(nil)); end - # Increases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to increase the current value - # @return [Fixnum] the current value after incrementation + # @!macro atomic_fixnum_method_increment # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:30 def increment(delta = T.unsafe(nil)); end - # Increases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to increase the current value - # @return [Fixnum] the current value after incrementation - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:34 def up(delta = T.unsafe(nil)); end - # Pass the current value to the given block, replacing it - # with the block's result. May retry if the value changes - # during the block's execution. - # - # @return [Object] the new value - # @yield [Object] Calculate a new value for the atomic reference using - # given (old) value - # @yieldparam old_value [Object] the starting value of the atomic reference + # @!macro atomic_fixnum_method_update # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:56 def update; end - # Retrieves the current `Fixnum` value. - # - # @return [Fixnum] the current value + # @!macro atomic_fixnum_method_value_get # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:20 def value; end - # Explicitly sets the value. - # - # @param value [Fixnum] the new value to be set - # @raise [ArgumentError] if the new value is not a `Fixnum` - # @return [Fixnum] the current value + # @!macro atomic_fixnum_method_value_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:25 def value=(value); end protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:65 def synchronize; end private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:76 def ns_set(value); end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:9 class Concurrent::MutexAtomicReference include ::Concurrent::AtomicDirectUpdate include ::Concurrent::AtomicNumericCompareAndSetWrapper extend ::Concurrent::Synchronization::SafeInitialization - # @param value [Object] The initial value. - # @return [MutexAtomicReference] a new instance of MutexAtomicReference + # @!macro atomic_reference_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:16 def initialize(value = T.unsafe(nil)); end - # Atomically sets the value to the given updated value if - # the current value == the expected value. - # - # that the actual value was not equal to the expected value. - # - # @param new_value [Object] the new value - # @param old_value [Object] the expected value - # @return [Boolean] `true` if successful. A `false` return indicates + # @!macro atomic_reference_method_compare_and_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:45 def _compare_and_set(old_value, new_value); end @@ -5950,95 +5261,60 @@ class Concurrent::MutexAtomicReference # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:13 def compare_and_swap(old_value, new_value); end - # Gets the current value. - # - # @return [Object] the current value + # @!macro atomic_reference_method_get # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:23 def get; end - # Atomically sets to the given value and returns the old value. - # - # @param new_value [Object] the new value - # @return [Object] the old value + # @!macro atomic_reference_method_get_and_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:35 def get_and_set(new_value); end - # Sets to the given value. - # - # @param new_value [Object] the new value - # @return [Object] the new value + # @!macro atomic_reference_method_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:29 def set(new_value); end - # Atomically sets to the given value and returns the old value. - # - # @param new_value [Object] the new value - # @return [Object] the old value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:42 def swap(new_value); end - # Gets the current value. - # - # @return [Object] the current value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:26 def value; end - # Sets to the given value. - # - # @param new_value [Object] the new value - # @return [Object] the new value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:32 def value=(new_value); end protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:59 def synchronize; end end -# A synchronization object that allows one thread to wait on multiple other threads. -# The thread that will wait creates a `CountDownLatch` and sets the initial value -# (normally equal to the number of other threads). The initiating thread passes the -# latch to the other threads then waits for the other threads by calling the `#wait` -# method. Each of the other threads calls `#count_down` when done with its work. -# When the latch counter reaches zero the waiting thread is unblocked and continues -# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# @!macro count_down_latch +# @!visibility private +# @!macro internal_implementation_note # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:9 class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject - # Create a new `CountDownLatch` with the initial `count`. - # - # @param count [new] the initial count - # @raise [ArgumentError] if `count` is not an integer or is less than zero - # @return [MutexCountDownLatch] a new instance of MutexCountDownLatch + # @!macro count_down_latch_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:12 def initialize(count = T.unsafe(nil)); end - # The current value of the counter. - # - # @return [Fixnum] the current value of the counter + # @!macro count_down_latch_method_count # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:34 def count; end - # Signal the latch to decrement the counter. Will signal all blocked threads when - # the `count` reaches zero. + # @!macro count_down_latch_method_count_down # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:26 def count_down; end - # Block on the latch until the counter reaches zero or until `timeout` is reached. - # - # @param timeout [Fixnum] the number of seconds to wait for the counter or `nil` - # to block indefinitely - # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` + # @!macro count_down_latch_method_wait # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:21 def wait(timeout = T.unsafe(nil)); end @@ -6049,58 +5325,84 @@ class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableO def ns_initialize(count); end end +# @!macro semaphore +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:9 class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject - # @return [MutexSemaphore] a new instance of MutexSemaphore + # @!macro semaphore_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:12 def initialize(count); end + # @!macro semaphore_method_acquire + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:20 def acquire(permits = T.unsafe(nil)); end + # @!macro semaphore_method_available_permits + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:38 def available_permits; end - # Acquires and returns all permits that are immediately available. + # @!macro semaphore_method_drain_permits # - # @return [Integer] + # Acquires and returns all permits that are immediately available. + # + # @return [Integer] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:47 def drain_permits; end # Shrinks the number of available permits by the indicated reduction. # - # @param reduction [Fixnum] Number of permits to remove. + # @param [Fixnum] reduction Number of permits to remove. + # # @raise [ArgumentError] if `reduction` is not an integer or is negative + # # @raise [ArgumentError] if `@free` - `@reduction` is less than zero + # # @return [nil] # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:99 def reduce_permits(reduction); end + # @!macro semaphore_method_release + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:77 def release(permits = T.unsafe(nil)); end + # @!macro semaphore_method_try_acquire + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:54 def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:110 def ns_initialize(count); end private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:117 def try_acquire_now(permits); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:127 def try_acquire_timed(permits, timeout); end end # Various classes within allows for +nil+ values to be stored, # so a special +NULL+ token is required to indicate the "nil-ness". +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/constants.rb:6 Concurrent::NULL = T.let(T.unsafe(nil), Object) @@ -6110,6 +5412,8 @@ Concurrent::NULL = T.let(T.unsafe(nil), Object) # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:108 Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/options.rb:6 module Concurrent::Options class << self @@ -6118,10 +5422,16 @@ module Concurrent::Options # Get the requested `Executor` based on the values set in the options hash. # - # @option opts - # @param opts [Hash] the options defining the requested executor + # @param [Hash] opts the options defining the requested executor + # @option opts [Executor] :executor when set use the given `Executor` instance. + # Three special values are also supported: `:fast` returns the global fast executor, + # `:io` returns the global io executor, and `:immediate` returns a new + # `ImmediateExecutor` object. + # # @return [Executor, nil] the requested thread pool, or nil when no option specified # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/options.rb:19 def executor_from_options(opts = T.unsafe(nil)); end end @@ -6176,6 +5486,8 @@ end # # Promises run on the global thread pool. # +# @!macro copy_options +# # ### Examples # # Start by requiring promises @@ -6307,26 +5619,26 @@ end class Concurrent::Promise < ::Concurrent::IVar # Initialize a new Promise with the provided options. # - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # + # @option opts [Promise] :parent the parent `Promise` when building a chain/tree + # @option opts [Proc] :on_fulfill fulfillment handler + # @option opts [Proc] :on_reject rejection handler + # @option opts [object, Array] :args zero or more arguments to be passed + # the task block on execution + # + # @yield The block operation to be performed asynchronously. + # # @raise [ArgumentError] if no block is given - # @return [Promise] a new instance of Promise - # @see http://promises-aplus.github.io/promises-spec/ + # # @see http://wiki.commonjs.org/wiki/Promises/A - # @yield The block operation to be performed asynchronously. + # @see http://promises-aplus.github.io/promises-spec/ # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:210 def initialize(opts = T.unsafe(nil), &block); end - # Chain onto this promise an action to be undertaken on failure - # (rejection). - # - # @return [Promise] self - # @yield The block to execute - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:364 def catch(&block); end @@ -6339,13 +5651,9 @@ class Concurrent::Promise < ::Concurrent::IVar # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:246 def execute; end - # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # @!macro ivar_fail_method # - # @param reason [Object] for the failure - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed # @raise [Concurrent::PromiseExecutionError] if not the root promise - # @return [IVar] self # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:278 def fail(reason = T.unsafe(nil)); end @@ -6356,59 +5664,56 @@ class Concurrent::Promise < ::Concurrent::IVar # # @example # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 + # # @return [Promise] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:375 def flat_map(&block); end - # Chain onto this promise an action to be undertaken on failure - # (rejection). - # - # @return [Promise] self - # @yield The block to execute - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:365 def on_error(&block); end # Chain onto this promise an action to be undertaken on success # (fulfillment). # - # @raise [ArgumentError] - # @return [Promise] self # @yield The block to execute # + # @return [Promise] self + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:349 def on_success(&block); end # Chain onto this promise an action to be undertaken on failure # (rejection). # - # @return [Promise] self # @yield The block to execute # + # @return [Promise] self + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:360 def rescue(&block); end - # Set the `IVar` to a value and wake or notify all threads waiting on it. + # @!macro ivar_set_method # - # @param value [Object] the value to store in the `IVar` - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed # @raise [Concurrent::PromiseExecutionError] if not the root promise - # @return [IVar] self - # @yield A block operation to use for setting the value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:262 def set(value = T.unsafe(nil), &block); end # Chain a new promise off the current promise. # - # @overload then - # @overload then - # @raise [ArgumentError] # @return [Promise] the new promise # @yield The block operation to be performed asynchronously. + # @overload then(rescuer, executor, &block) + # @param [Proc] rescuer An optional rescue block to be executed if the + # promise is rejected. + # @param [ThreadPool] executor An optional thread pool executor to be used + # in the new Promise + # @overload then(rescuer, executor: executor, &block) + # @param [Proc] rescuer An optional rescue block to be executed if the + # promise is rejected. + # @param [ThreadPool] executor An optional thread pool executor to be used + # in the new Promise # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:314 def then(*args, &block); end @@ -6416,8 +5721,15 @@ class Concurrent::Promise < ::Concurrent::IVar # Builds a promise that produces the result of self and others in an Array # and fails if any of them fails. # - # @overload zip - # @overload zip + # @overload zip(*promises) + # @param [Array] others + # + # @overload zip(*promises, opts) + # @param [Array] others + # @param [Hash] opts the configuration options + # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. + # @option opts [Boolean] :execute (true) execute promise before returning + # # @return [Promise] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:440 @@ -6425,35 +5737,51 @@ class Concurrent::Promise < ::Concurrent::IVar protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:551 def complete(success, value, reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:545 def notify_child(child); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:481 def ns_initialize(value, opts); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:533 def on_fulfill(result); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:539 def on_reject(reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:562 def realize(task); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:528 def root?; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:520 def set_pending; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:570 def set_state!(success, value, reason); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:576 def synchronized_set_state!(success, value, reason); end @@ -6466,19 +5794,7 @@ class Concurrent::Promise < ::Concurrent::IVar # `true` or executing the composite's `#rescue` handlers if the predicate # returns false. # - # - # The returned promise will not yet have been executed. Additional `#then` - # and `#rescue` handlers may still be provided. Once the returned promise - # is execute the aggregate promises will be also be executed (if they have - # not been executed already). The results of the aggregate promises will - # be checked upon completion. The necessary `#then` and `#rescue` blocks - # on the aggregating promise will then be executed as appropriate. If the - # `#rescue` handlers are executed the raises exception will be - # `Concurrent::PromiseExecutionError`. - # - # @param promises [Array] Zero or more promises to aggregate - # @return [Promise] an unscheduled (not executed) promise that aggregates - # the promises given as arguments + # @!macro promise_self_aggregate # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:505 def aggregate(method, *promises); end @@ -6489,7 +5805,20 @@ class Concurrent::Promise < ::Concurrent::IVar # fail. Upon execution will execute any of the aggregate promises that # were not already executed. # - # @return [Boolean] + # @!macro promise_self_aggregate + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param [Array] promises Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:464 def all?(*promises); end @@ -6500,19 +5829,7 @@ class Concurrent::Promise < ::Concurrent::IVar # fail. Upon execution will execute any of the aggregate promises that # were not already executed. # - # - # The returned promise will not yet have been executed. Additional `#then` - # and `#rescue` handlers may still be provided. Once the returned promise - # is execute the aggregate promises will be also be executed (if they have - # not been executed already). The results of the aggregate promises will - # be checked upon completion. The necessary `#then` and `#rescue` blocks - # on the aggregating promise will then be executed as appropriate. If the - # `#rescue` handlers are executed the raises exception will be - # `Concurrent::PromiseExecutionError`. - # - # @param promises [Array] Zero or more promises to aggregate - # @return [Promise] an unscheduled (not executed) promise that aggregates - # the promises given as arguments + # @!macro promise_self_aggregate # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:475 def any?(*promises); end @@ -6520,28 +5837,29 @@ class Concurrent::Promise < ::Concurrent::IVar # Create a new `Promise` object with the given block, execute it, and return the # `:pending` object. # + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # + # @return [Promise] the newly created `Promise` in the `:pending` state + # + # @raise [ArgumentError] if no block is given + # # @example # promise = Concurrent::Promise.execute{ sleep(1); 42 } # promise.state #=> :pending - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Promise] the newly created `Promise` in the `:pending` state # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:296 def execute(opts = T.unsafe(nil), &block); end # Create a new `Promise` and fulfill it immediately. # - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # # @raise [ArgumentError] if no block is given + # # @return [Promise] the newly created `Promise` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:224 @@ -6549,12 +5867,12 @@ class Concurrent::Promise < ::Concurrent::IVar # Create a new `Promise` and reject it immediately. # - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # # @raise [ArgumentError] if no block is given + # # @return [Promise] the newly created `Promise` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:237 @@ -6563,8 +5881,15 @@ class Concurrent::Promise < ::Concurrent::IVar # Builds a promise that produces the result of promises in an Array # and fails if any of them fails. # - # @overload zip - # @overload zip + # @overload zip(*promises) + # @param [Array] promises + # + # @overload zip(*promises, opts) + # @param [Array] promises + # @param [Hash] opts the configuration options + # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. + # @option opts [Boolean] :execute (true) execute promise before returning + # # @return [Promise] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:409 @@ -6595,88 +5920,86 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: include ::Concurrent::Promises::InternalStates extend ::Concurrent::Synchronization::SafeInitialization - # @return [AbstractEventFuture] a new instance of AbstractEventFuture - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:522 def initialize(promise, default_executor); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 def __initialize_atomic_fields__; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:738 def add_callback_clear_delayed_node(node); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:733 def add_callback_notify_blocked(promise, index); end # For inspection. - # + # @!visibility private # @return [Array] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:702 def blocks; end # For inspection. + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:710 def callbacks; end - # Shortcut of {#chain_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #chain_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:596 def chain(*args, &task); end # Chains the task to be executed asynchronously on executor after it is resolved. # - # @overload a_future.chain_on - # @overload an_event.chain_on - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. + # @!macro promises.param.executor + # @!macro promises.param.args # @return [Future] - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. + # @!macro promise.param.task-future + # + # @overload an_event.chain_on(executor, *args, &task) + # @yield [*args] to the task. + # @overload a_future.chain_on(executor, *args, &task) + # @yield [fulfilled, value, reason, *args] to the task. + # @yieldparam [true, false] fulfilled + # @yieldparam [Object] value + # @yieldparam [Object] reason # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:614 def chain_on(executor, *args, &task); end # Resolves the resolvable when receiver is resolved. # - # @param resolvable [Resolvable] + # @param [Resolvable] resolvable # @return [self] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:629 def chain_resolvable(resolvable); end # Returns default executor. - # # @return [Executor] default executor # @see #with_default_executor - # @see FactoryMethods#any_fulfilled_future_on # @see FactoryMethods#future_on # @see FactoryMethods#resolvable_future + # @see FactoryMethods#any_fulfilled_future_on # @see similar # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:590 def default_executor; end - # @return [String] Short string representation. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:623 def inspect; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 def internal_state; end - # Shortcut of {#on_resolution_using} with default `:io` executor supplied. - # + # @!macro promises.shortcut.using # @return [self] - # @see #on_resolution_using # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:637 def on_resolution(*args, &callback); end @@ -6684,66 +6007,74 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # Stores the callback to be executed synchronously on resolving thread after it is # resolved. # - # @overload a_future.on_resolution! - # @overload an_event.on_resolution! - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). + # @!macro promises.param.args + # @!macro promise.param.callback # @return [self] - # @yieldreturn is forgotten. + # + # @overload an_event.on_resolution!(*args, &callback) + # @yield [*args] to the callback. + # @overload a_future.on_resolution!(*args, &callback) + # @yield [fulfilled, value, reason, *args] to the callback. + # @yieldparam [true, false] fulfilled + # @yieldparam [Object] value + # @yieldparam [Object] reason # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:655 def on_resolution!(*args, &callback); end # Stores the callback to be executed asynchronously on executor after it is resolved. # - # @overload a_future.on_resolution_using - # @overload an_event.on_resolution_using - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.callback # @return [self] - # @yieldreturn is forgotten. + # + # @overload an_event.on_resolution_using(executor, *args, &callback) + # @yield [*args] to the callback. + # @overload a_future.on_resolution_using(executor, *args, &callback) + # @yield [fulfilled, value, reason, *args] to the callback. + # @yieldparam [true, false] fulfilled + # @yieldparam [Object] value + # @yieldparam [Object] reason # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:673 def on_resolution_using(executor, *args, &callback); end # Is it in pending state? - # # @return [Boolean] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:549 def pending?; end # For inspection. + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:716 def promise; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:688 def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end # Is it in resolved state? - # # @return [Boolean] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:555 def resolved?; end # Returns its state. + # @return [Symbol] # - # @overload a_future.state # @overload an_event.state - # @return [Symbol] + # @return [:pending, :resolved] + # @overload a_future.state + # Both :fulfilled, :rejected implies :resolved. + # @return [:pending, :fulfilled, :rejected] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:543 def state; end - # Resolves the resolvable when receiver is resolved. - # - # @param resolvable [Resolvable] - # @return [self] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:633 def tangle(resolvable); end @@ -6754,48 +6085,47 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: # Propagates touch. Requests all the delayed futures, which it depends on, to be # executed. This method is called by any other method requiring resolved state, like {#wait}. - # # @return [self] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:562 def touch; end # For inspection. - # - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:722 def touched?; end - # Wait (block the Thread) until receiver is {#resolved?}. - # Calls {Concurrent::AbstractEventFuture#touch}. + # @!macro promises.method.wait + # Wait (block the Thread) until receiver is {#resolved?}. + # @!macro promises.touches # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @param timeout [Numeric] the maximum time in second to wait. - # @return [self, true, false] self implies timeout was not used, true implies timeout was used - # and it was resolved, false implies it was not resolved within timeout. + # @!macro promises.warn.blocks + # @!macro promises.param.timeout + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:578 def wait(timeout = T.unsafe(nil)); end # For inspection. + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:728 def waiting_threads; end - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # + # @!macro promises.method.with_default_executor + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # @!macro promises.shortcut.event-future # @abstract - # @raise [NotImplementedError] # @return [AbstractEventFuture] - # @see Event#with_default_executor - # @see Future#with_default_executor # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:683 def with_default_executor(executor); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:743 def with_hidden_resolvable; end @@ -6842,8 +6172,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1796 class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise - # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1798 def initialize(delayed_because, blockers_count, event_or_future); end @@ -6858,13 +6186,9 @@ class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::Blocke # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1820 def on_resolvable(resolved_future, index); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1824 def resolvable?(countdown, future, index); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1816 def touched?; end end @@ -6877,8 +6201,6 @@ class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Obj include ::Concurrent::Promises::InternalStates extend ::Concurrent::Synchronization::SafeInitialization - # @return [AbstractPromise] a new instance of AbstractPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1553 def initialize(future); end @@ -6921,16 +6243,12 @@ end class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise private - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2088 def resolvable?(countdown, event_or_future, index); end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2050 class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise - # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2054 def initialize(delayed, blockers_count, default_executor); end @@ -6939,16 +6257,12 @@ class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::Ab # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2062 def on_resolvable(resolved_future, index); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2058 def resolvable?(countdown, future, index); end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2067 class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise - # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2071 def initialize(delayed, blockers_count, default_executor); end @@ -6957,8 +6271,6 @@ class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::A # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2079 def on_resolvable(resolved_future, index); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2075 def resolvable?(countdown, future, index); end end @@ -6967,8 +6279,6 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1619 class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise - # @return [BlockedPromise] a new instance of BlockedPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1661 def initialize(delayed, blockers_count, future); end @@ -6991,15 +6301,13 @@ class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromis # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1691 def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1710 def on_resolvable(resolved_future, index); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1706 def process_on_blocker_resolution(future, index); end - # @return [true, false] if resolvable + # @return [true,false] if resolvable # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1702 def resolvable?(countdown, future, index); end @@ -7028,9 +6336,6 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1716 class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise - # @raise [ArgumentError] - # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1717 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end @@ -7048,8 +6353,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2095 class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise - # @return [DelayPromise] a new instance of DelayPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2097 def initialize(default_executor); end @@ -7066,14 +6369,6 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:826 class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future, Event] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:847 def &(other); end @@ -7093,12 +6388,12 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:863 def delay; end - # Creates new event dependent on receiver scheduled to execute on/in intended_time. - # In time is interpreted from the moment the receiver is resolved, therefore it inserts - # delay into the chain. + # @!macro promise.method.schedule + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. # - # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. + # @!macro promises.param.intended_time # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:875 @@ -7108,7 +6403,6 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture def then(*args, &task); end # Returns self, since this is event - # # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:893 @@ -7121,30 +6415,24 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:885 def to_future; end - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # + # @!macro promises.method.with_default_executor # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:899 def with_default_executor(executor); end - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. + # @!macro promises.method.zip + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. # # @return [Future, Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:839 def zip(other); end - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. - # - # @return [Event] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:857 def |(event_or_future); end @@ -7153,16 +6441,12 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:910 def callback_on_resolution(state, args, callback); end - # @raise [Concurrent::MultipleAssignmentError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:905 def rejected_resolution(raise_on_reassign, state); end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1972 class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise - # @return [EventWrapperPromise] a new instance of EventWrapperPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1973 def initialize(delayed, blockers_count, default_executor); end @@ -7182,39 +6466,27 @@ module Concurrent::Promises::FactoryMethods extend ::Concurrent::Promises::FactoryMethods::Configuration extend ::Concurrent::Promises::FactoryMethods - # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #any_resolved_future_on - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:282 def any(*futures_and_or_events); end - # Shortcut of {#any_event_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Event] - # @see #any_event_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:319 def any_event(*futures_and_or_events); end # Creates a new event which becomes resolved after the first futures_and_or_events resolves. - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. + # @!macro promises.any-touch # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:329 def any_event_on(default_executor, *futures_and_or_events); end - # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #any_fulfilled_future_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:300 def any_fulfilled_future(*futures_and_or_events); end @@ -7222,48 +6494,38 @@ module Concurrent::Promises::FactoryMethods # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. # Its result equals the result of the first resolved future or if all futures_and_or_events reject, # it has reason of the last rejected future. - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] + # @!macro promises.any-touch + # @!macro promises.event-conversion + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:313 def any_fulfilled_future_on(default_executor, *futures_and_or_events); end - # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #any_resolved_future_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:278 def any_resolved_future(*futures_and_or_events); end # Creates a new future which is resolved after the first futures_and_or_events is resolved. # Its result equals the result of the first resolved future. - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] + # @!macro promises.any-touch + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # @!macro promises.event-conversion + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:294 def any_resolved_future_on(default_executor, *futures_and_or_events); end - # Shortcut of {#delay_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future, Event] - # @see #delay_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:190 def delay(*args, &task); end @@ -7271,30 +6533,31 @@ module Concurrent::Promises::FactoryMethods # Creates a new event or future which is resolved only after it is touched, # see {Concurrent::AbstractEventFuture#touch}. # - # @overload delay_on - # @overload delay_on - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @!macro promises.param.default_executor + # @overload delay_on(default_executor, *args, &task) + # If task is provided it returns a {Future} representing the result of the task. + # @!macro promises.param.args + # @yield [*args] to the task. + # @!macro promise.param.task-future + # @return [Future] + # @overload delay_on(default_executor) + # If no task is provided, it returns an {Event} + # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:207 def delay_on(default_executor, *args, &task); end # Creates a resolved future which will be fulfilled with the given value. # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param value [Object] + # @!macro promises.param.default_executor + # @param [Object] value # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:127 def fulfilled_future(value, default_executor = T.unsafe(nil)); end - # Shortcut of {#future_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #future_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:94 def future(*args, &task); end @@ -7302,16 +6565,11 @@ module Concurrent::Promises::FactoryMethods # Constructs a new Future which will be resolved after block is evaluated on default executor. # Evaluation begins immediately. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [Future] + # @!macro promises.param.default_executor + # @!macro promises.param.args # @yield [*args] to the task. - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. + # @!macro promise.param.task-future + # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:106 def future_on(default_executor, *args, &task); end @@ -7319,35 +6577,44 @@ module Concurrent::Promises::FactoryMethods # General constructor. Behaves differently based on the argument's type. It's provided for convenience # but it's better to be explicit. # - # @overload make_future - # @overload make_future - # @overload make_future - # @overload make_future - # @overload make_future - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [Event, Future] # @see rejected_future, resolved_event, fulfilled_future + # @!macro promises.param.default_executor + # @return [Event, Future] + # + # @overload make_future(nil, default_executor = self.default_executor) + # @param [nil] nil + # @return [Event] resolved event. + # + # @overload make_future(a_future, default_executor = self.default_executor) + # @param [Future] a_future + # @return [Future] a future which will be resolved when a_future is. + # + # @overload make_future(an_event, default_executor = self.default_executor) + # @param [Event] an_event + # @return [Event] an event which will be resolved when an_event is. + # + # @overload make_future(exception, default_executor = self.default_executor) + # @param [Exception] exception + # @return [Future] a rejected future with the exception as its reason. + # + # @overload make_future(value, default_executor = self.default_executor) + # @param [Object] value when none of the above overloads fits + # @return [Future] a fulfilled future with the value. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:174 def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end # Creates a resolved future which will be rejected with the given reason. # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param reason [Object] + # @!macro promises.param.default_executor + # @param [Object] reason # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:136 def rejected_future(reason, default_executor = T.unsafe(nil)); end - # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [ResolvableEvent] - # @see #resolvable_event_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:63 def resolvable_event; end @@ -7355,18 +6622,14 @@ module Concurrent::Promises::FactoryMethods # Creates a resolvable event, user is responsible for resolving the event once # by calling {Promises::ResolvableEvent#resolve}. # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @!macro promises.param.default_executor # @return [ResolvableEvent] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:72 def resolvable_event_on(default_executor = T.unsafe(nil)); end - # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [ResolvableFuture] - # @see #resolvable_future_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:78 def resolvable_future; end @@ -7375,9 +6638,7 @@ module Concurrent::Promises::FactoryMethods # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, # or {Promises::ResolvableFuture#reject} # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @!macro promises.param.default_executor # @return [ResolvableFuture] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:88 @@ -7385,9 +6646,7 @@ module Concurrent::Promises::FactoryMethods # Creates resolved event. # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @!macro promises.param.default_executor # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:144 @@ -7396,50 +6655,45 @@ module Concurrent::Promises::FactoryMethods # Creates a resolved future with will be either fulfilled with the given value or rejected with # the given reason. # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param fulfilled [true, false] - # @param reason [Object] - # @param value [Object] + # @param [true, false] fulfilled + # @param [Object] value + # @param [Object] reason + # @!macro promises.param.default_executor # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:118 def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end - # Shortcut of {#schedule_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future, Event] - # @see #schedule_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:214 def schedule(intended_time, *args, &task); end # Creates a new event or future which is resolved in intended_time. # - # @overload schedule_on - # @overload schedule_on - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. + # @!macro promises.param.default_executor + # @!macro promises.param.intended_time + # @param [Numeric, Time] intended_time `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @overload schedule_on(default_executor, intended_time, *args, &task) + # If task is provided it returns a {Future} representing the result of the task. + # @!macro promises.param.args + # @yield [*args] to the task. + # @!macro promise.param.task-future + # @return [Future] + # @overload schedule_on(default_executor, intended_time) + # If no task is provided, it returns an {Event} + # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:233 def schedule_on(default_executor, intended_time, *args, &task); end - # Shortcut of {#zip_futures_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #zip_futures_on - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:258 def zip(*futures_and_or_events); end - # Shortcut of {#zip_events_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Event] - # @see #zip_events_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:262 def zip_events(*futures_and_or_events); end @@ -7447,19 +6701,15 @@ module Concurrent::Promises::FactoryMethods # Creates a new event which is resolved after all futures_and_or_events are resolved. # (Future is resolved when fulfilled or rejected.) # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events # @return [Event] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:272 def zip_events_on(default_executor, *futures_and_or_events); end - # Shortcut of {#zip_futures_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #zip_futures_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:240 def zip_futures(*futures_and_or_events); end @@ -7467,13 +6717,12 @@ module Concurrent::Promises::FactoryMethods # Creates a new future which is resolved after all futures_and_or_events are resolved. # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. # If there is an error it rejects. - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. + # @!macro promises.event-conversion + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:254 @@ -7492,8 +6741,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1840 class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise - # @return [FlatEventPromise] a new instance of FlatEventPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1844 def initialize(delayed, blockers_count, default_executor); end @@ -7505,9 +6752,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1873 class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise - # @raise [ArgumentError] - # @return [FlatFuturePromise] a new instance of FlatFuturePromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1877 def initialize(delayed, blockers_count, levels, default_executor); end @@ -7522,14 +6766,6 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:917 class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1078 def &(other); end @@ -7542,6 +6778,8 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1085 def any(event_or_future); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1215 def apply(args, block); end @@ -7565,12 +6803,6 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1013 def exception(*args); end - # Creates new future which will have result of the future returned by receiver. If receiver - # rejects it will have its rejection. - # - # @param level [Integer] how many levels of futures should flatten - # @return [Future] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1124 def flat(level = T.unsafe(nil)); end @@ -7585,28 +6817,23 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Creates new future which will have result of the future returned by receiver. If receiver # rejects it will have its rejection. # - # @param level [Integer] how many levels of futures should flatten + # @param [Integer] level how many levels of futures should flatten # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1120 def flat_future(level = T.unsafe(nil)); end # Is it in fulfilled state? - # # @return [Boolean] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:921 def fulfilled?; end - # @return [String] Short string representation. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1243 def inspect; end - # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. - # + # @!macro promises.shortcut.using # @return [self] - # @see #on_fulfillment_using # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1136 def on_fulfillment(*args, &callback); end @@ -7614,11 +6841,10 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Stores the callback to be executed synchronously on resolving thread after it is # fulfilled. Does nothing on rejection. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). + # @!macro promises.param.args + # @!macro promise.param.callback # @return [self] # @yield [value, *args] to the callback. - # @yieldreturn is forgotten. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1147 def on_fulfillment!(*args, &callback); end @@ -7626,21 +6852,17 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Stores the callback to be executed asynchronously on executor after it is # fulfilled. Does nothing on rejection. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.callback # @return [self] # @yield [value, *args] to the callback. - # @yieldreturn is forgotten. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1159 def on_fulfillment_using(executor, *args, &callback); end - # Shortcut of {#on_rejection_using} with default `:io` executor supplied. - # + # @!macro promises.shortcut.using # @return [self] - # @see #on_rejection_using # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1165 def on_rejection(*args, &callback); end @@ -7648,11 +6870,10 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Stores the callback to be executed synchronously on resolving thread after it is # rejected. Does nothing on fulfillment. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). + # @!macro promises.param.args + # @!macro promise.param.callback # @return [self] # @yield [reason, *args] to the callback. - # @yieldreturn is forgotten. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1176 def on_rejection!(*args, &callback); end @@ -7660,43 +6881,35 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Stores the callback to be executed asynchronously on executor after it is # rejected. Does nothing on fulfillment. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.callback # @return [self] # @yield [reason, *args] to the callback. - # @yieldreturn is forgotten. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1188 def on_rejection_using(executor, *args, &callback); end # Returns reason of future's rejection. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - # @param timeout [Numeric] the maximum time in second to wait. - # @param timeout_value [Object] a value returned by the method when it times out + # @!macro promises.touches + # + # @!macro promises.warn.blocks + # @!macro promises.warn.nil + # @!macro promises.param.timeout + # @!macro promises.param.timeout_value # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:966 def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end # Is it in rejected state? - # # @return [Boolean] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:928 def rejected?; end - # Shortcut of {#rescue_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #rescue_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1052 def rescue(*args, &task); end @@ -7704,25 +6917,20 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Chains the task to be executed asynchronously on executor after it rejects. Does not run # the task if it fulfills. It will resolve though, triggering any dependent futures. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.task-future # @return [Future] # @yield [reason, *args] to the task. - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1064 def rescue_on(executor, *args, &task); end # Returns triplet fulfilled?, value, reason. - # Calls {Concurrent::AbstractEventFuture#touch}. + # @!macro promises.touches # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @param timeout [Numeric] the maximum time in second to wait. + # @!macro promises.warn.blocks + # @!macro promises.param.timeout # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil # on timeout. # @@ -7734,37 +6942,31 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # values is returned which becomes result of the returned future. Any encountered exception # will become reason of the returned future. # - # @example - # body = lambda do |v| - # v += 1 - # v < 5 ? Promises.future(v, &body) : v - # end - # Promises.future(0, &body).run.value! # => 5 - # @param run_test [#call(value)] an object which when called returns either Future to keep running with + # @return [Future] + # @param [#call(value)] run_test + # an object which when called returns either Future to keep running with # or nil, then the run completes with the value. # The run_test can be used to extract the Future from deeper structure, # or to distinguish Future which is a resulting value from a future # which is suppose to continue running. - # @return [Future] + # @example + # body = lambda do |v| + # v += 1 + # v < 5 ? Promises.future(v, &body) : v + # end + # Promises.future(0, &body).run.value! # => 5 # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1210 def run(run_test = T.unsafe(nil)); end - # Creates new event dependent on receiver scheduled to execute on/in intended_time. - # In time is interpreted from the moment the receiver is resolved, therefore it inserts - # delay into the chain. - # - # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. + # @!macro promise.method.schedule # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1102 def schedule(intended_time); end - # Shortcut of {#then_on} with default `:io` executor supplied. - # + # @!macro promises.shortcut.on # @return [Future] - # @see #then_on # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1034 def then(*args, &task); end @@ -7772,15 +6974,11 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # Chains the task to be executed asynchronously on executor after it fulfills. Does not run # the task if it rejects. It will resolve though, triggering any dependent futures. # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.task-future # @return [Future] # @yield [value, *args] to the task. - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1046 def then_on(executor, *args, &task); end @@ -7793,7 +6991,6 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture def to_event; end # Returns self, since this is a future - # # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1230 @@ -7804,16 +7001,15 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1235 def to_s; end - # Return value of the future. - # Calls {Concurrent::AbstractEventFuture#touch}. + # @!macro promises.method.value + # Return value of the future. + # @!macro promises.touches # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - # @param timeout [Numeric] the maximum time in second to wait. - # @param timeout_value [Object] a value returned by the method when it times out + # @!macro promises.warn.blocks + # @!macro promises.warn.nil + # @!macro promises.param.timeout + # @!macro promises.param.timeout_value + # @param [Object] timeout_value a value returned by the method when it times out # @return [Object, nil, timeout_value] the value of the Future when fulfilled, # timeout_value on timeout, # nil on rejection. @@ -7821,62 +7017,33 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:950 def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - # Return value of the future. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - # @param timeout [Numeric] the maximum time in second to wait. - # @param timeout_value [Object] a value returned by the method when it times out - # @raise [Exception] {#reason} on rejection + # @!macro promises.method.value # @return [Object, nil, timeout_value] the value of the Future when fulfilled, # or nil on rejection, # or timeout_value on timeout. + # @raise [Exception] {#reason} on rejection # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:997 def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - # Wait (block the Thread) until receiver is {#resolved?}. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @param timeout [Numeric] the maximum time in second to wait. + # @!macro promises.method.wait # @raise [Exception] {#reason} on rejection - # @return [self, true, false] self implies timeout was not used, true implies timeout was used - # and it was resolved, false implies it was not resolved within timeout. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:987 def wait!(timeout = T.unsafe(nil)); end - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # + # @!macro promises.method.with_default_executor # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1111 def with_default_executor(executor); end - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # + # @!macro promises.method.zip # @return [Future] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1070 def zip(other); end - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. Returning future will have value nil if event_or_future is event and resolves - # first. - # - # @return [Future] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1089 def |(event_or_future); end @@ -7903,16 +7070,12 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1247 def run_test(v); end - # @raise [self] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1266 def wait_until_resolved!(timeout = T.unsafe(nil)); end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1984 class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise - # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1985 def initialize(delayed, blockers_count, default_executor); end @@ -7926,16 +7089,12 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1783 class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise - # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1784 def initialize(default_executor); end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1789 class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise - # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1790 def initialize(default_executor, fulfilled, value, reason); end end @@ -7948,18 +7107,16 @@ class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromi # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:338 module Concurrent::Promises::InternalStates; end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:397 class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult - # @return [Fulfilled] a new instance of Fulfilled - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:399 def initialize(value); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:407 def apply(args, block); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:403 def fulfilled?; end @@ -7973,27 +7130,29 @@ class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises:: def value; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:425 class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:426 def apply(args, block); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:488 Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:459 class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult - # @return [PartiallyRejected] a new instance of PartiallyRejected - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:460 def initialize(value, reason); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:482 def apply(args, block); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:466 def fulfilled?; end @@ -8007,10 +7166,10 @@ class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Pr def value; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:351 class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:352 def resolved?; end @@ -8018,24 +7177,26 @@ class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::In def to_sym; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:490 Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:492 Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:432 class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult - # @return [Rejected] a new instance of Rejected - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:433 def initialize(reason); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:453 def apply(args, block); end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:437 def fulfilled?; end @@ -8049,29 +7210,24 @@ class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::I def value; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:362 class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:366 class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:391 def apply; end - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:379 def fulfilled?; end - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:387 def reason; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:367 def resolved?; end @@ -8081,30 +7237,23 @@ class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::P # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:371 def to_sym; end - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:383 def value; end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:340 class Concurrent::Promises::InternalStates::State - # @raise [NotImplementedError] - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:341 def resolved?; end - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:345 def to_sym; end end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1748 class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise - # @return [RescuePromise] a new instance of RescuePromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1751 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end @@ -8129,12 +7278,12 @@ class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event # Makes the event resolved, which triggers all dependent futures. # - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved + # @param [true, false] reserved + # Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1324 def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end @@ -8142,7 +7291,8 @@ class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event # Behaves as {AbstractEventFuture#wait} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [true, false] If it times out and the argument is true it will also resolve the event. + # @param [true, false] resolve_on_timeout + # If it times out and the argument is true it will also resolve the event. # @return [self, true, false] # @see AbstractEventFuture#wait # @@ -8159,8 +7309,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1600 class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise - # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1601 def initialize(default_executor); end end @@ -8174,9 +7322,9 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Evaluates the block and sets its result as future's value fulfilling, if the block raises # an exception the future rejects with it. # - # @return [self] # @yield [*args] to the block. # @yieldreturn [Object] value + # @return [self] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1395 def evaluate_to(*args, &block); end @@ -8184,10 +7332,10 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Evaluates the block and sets its result as future's value fulfilling, if the block raises # an exception the future rejects with it. # - # @raise [Exception] also raise reason on rejection. - # @return [self] # @yield [*args] to the block. # @yieldreturn [Object] value + # @return [self] + # @raise [Exception] also raise reason on rejection. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1406 def evaluate_to!(*args, &block); end @@ -8195,13 +7343,9 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Makes the future fulfilled with `value`, # which triggers all dependent futures. # - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @param value [Object] - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. + # @param [Object] value + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1375 def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end @@ -8209,8 +7353,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Behaves as {Future#reason} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. + # @!macro promises.resolvable.resolve_on_timeout # @return [Exception, timeout_value, nil] # @see Future#reason # @@ -8220,13 +7363,9 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Makes the future rejected with `reason`, # which triggers all dependent futures. # - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reason [Object] - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. + # @param [Object] reason + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1385 def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end @@ -8234,15 +7373,11 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, # which triggers all dependent futures. # - # @param fulfilled [true, false] - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reason [Object] - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @param value [Object] - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. + # @param [true, false] fulfilled + # @param [Object] value + # @param [Object] reason + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1365 def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end @@ -8250,8 +7385,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Behaves as {Future#result} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. + # @!macro promises.resolvable.resolve_on_timeout # @return [::Array(Boolean, Object, Exception), nil] # @see Future#result # @@ -8261,8 +7395,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Behaves as {Future#value} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. + # @!macro promises.resolvable.resolve_on_timeout # @return [Object, timeout_value, nil] # @see Future#value # @@ -8272,10 +7405,9 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Behaves as {Future#value!} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @raise [Exception] {#reason} on rejection + # @!macro promises.resolvable.resolve_on_timeout # @return [Object, timeout_value, nil] + # @raise [Exception] {#reason} on rejection # @see Future#value! # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1481 @@ -8284,8 +7416,7 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Behaves as {AbstractEventFuture#wait} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. + # @!macro promises.resolvable.resolve_on_timeout # @return [self, true, false] # @see AbstractEventFuture#wait # @@ -8295,10 +7426,9 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future # Behaves as {Future#wait!} but has one additional optional argument # resolve_on_timeout. # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @raise [Exception] {#reason} on rejection + # @!macro promises.resolvable.resolve_on_timeout # @return [self, true, false] + # @raise [Exception] {#reason} on rejection # @see Future#wait! # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1438 @@ -8314,8 +7444,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1606 class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise - # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1607 def initialize(default_executor); end @@ -8325,8 +7453,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1909 class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise - # @return [RunFuturePromise] a new instance of RunFuturePromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1913 def initialize(delayed, blockers_count, default_executor, run_test); end @@ -8338,8 +7464,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2114 class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise - # @return [ScheduledPromise] a new instance of ScheduledPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2125 def initialize(default_executor, intended_time); end @@ -8352,8 +7476,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1730 class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise - # @return [ThenPromise] a new instance of ThenPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1733 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end @@ -8365,8 +7487,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1940 class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1941 def initialize(delayed, blockers_count, default_executor); end @@ -8378,8 +7498,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2031 class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipEventsPromise] a new instance of ZipEventsPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2035 def initialize(delayed, blockers_count, default_executor); end @@ -8391,8 +7509,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1952 class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1953 def initialize(delayed, blockers_count, default_executor); end @@ -8407,8 +7523,6 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1996 class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2000 def initialize(delayed, blockers_count, default_executor); end @@ -8427,24 +7541,24 @@ end # # @example # module A -# def a -# :a -# end +# def a +# :a +# end # end # # module B1 # end # # class C1 -# include B1 +# include B1 # end # # module B2 -# extend Concurrent::ReInclude +# extend Concurrent::ReInclude # end # # class C2 -# include B2 +# include B2 # end # # B1.send :include, A @@ -8453,14 +7567,22 @@ end # C1.new.respond_to? :a # => false # C2.new.respond_to? :a # => true # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:36 module Concurrent::ReInclude + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:44 def extended(base); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:50 def include(*modules); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:38 def included(base); end end @@ -8481,9 +7603,11 @@ end # lock = Concurrent::ReadWriteLock.new # lock.with_read_lock { data.retrieve } # lock.with_write_lock { data.modify! } +# # @note Do **not** try to acquire the write lock while already holding a read lock # **or** try to acquire the write lock while you already have it. # This will lead to deadlock +# # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:31 @@ -8492,26 +7616,26 @@ class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object # Create a new `ReadWriteLock` in the unlocked state. # - # @return [ReadWriteLock] a new instance of ReadWriteLock - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:59 def initialize; end # Acquire a read lock. If a write lock has been acquired will block until # it is released. Will not block if other read locks have been acquired. # + # @return [Boolean] true if the lock is successfully acquired + # # @raise [Concurrent::ResourceLimitError] if the maximum number of readers # is exceeded. - # @return [Boolean] true if the lock is successfully acquired # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:111 def acquire_read_lock; end # Acquire a write lock. Will block and wait for all active readers and writers. # + # @return [Boolean] true if the lock is successfully acquired + # # @raise [Concurrent::ResourceLimitError] if the maximum number of writers # is exceeded. - # @return [Boolean] true if the lock is successfully acquired # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:160 def acquire_write_lock; end @@ -8539,22 +7663,26 @@ class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object # Execute a block operation within a read lock. # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # # @raise [ArgumentError] when no block is given. # @raise [Concurrent::ResourceLimitError] if the maximum number of readers # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:75 def with_read_lock; end # Execute a block operation within a write lock. # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # # @raise [ArgumentError] when no block is given. # @raise [Concurrent::ResourceLimitError] if the maximum number of readers # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:94 def with_write_lock; end @@ -8568,47 +7696,59 @@ class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object private - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:246 def max_readers?(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:251 def max_writers?(c = T.unsafe(nil)); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:221 def running_readers(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:226 def running_readers?(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:231 def running_writer?(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:241 def waiting_writer?(c = T.unsafe(nil)); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:236 def waiting_writers(c = T.unsafe(nil)); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:40 Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:43 Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:37 Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:34 Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) @@ -8635,8 +7775,6 @@ Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) # necessary to release them in the same order they were acquired. In other words, # the following code is legal: # -# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. -# # @example # lock = Concurrent::ReentrantReadWriteLock.new # lock.acquire_write_lock @@ -8647,10 +7785,14 @@ Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) # lock.release_read_lock # # Now the current thread is not holding either a read or write lock, so # # another thread could potentially acquire a write lock. +# +# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. +# # @example # lock = Concurrent::ReentrantReadWriteLock.new # lock.with_read_lock { data.retrieve } # lock.with_write_lock { data.modify! } +# # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:53 @@ -8659,26 +7801,26 @@ class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object # Create a new `ReentrantReadWriteLock` in the unlocked state. # - # @return [ReentrantReadWriteLock] a new instance of ReentrantReadWriteLock - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:109 def initialize; end # Acquire a read lock. If a write lock is held by another thread, will block # until it is released. # + # @return [Boolean] true if the lock is successfully acquired + # # @raise [Concurrent::ResourceLimitError] if the maximum number of readers # is exceeded. - # @return [Boolean] true if the lock is successfully acquired # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:162 def acquire_read_lock; end # Acquire a write lock. Will block and wait for all active readers and writers. # + # @return [Boolean] true if the lock is successfully acquired + # # @raise [Concurrent::ResourceLimitError] if the maximum number of writers # is exceeded. - # @return [Boolean] true if the lock is successfully acquired # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:257 def acquire_write_lock; end @@ -8715,88 +7857,112 @@ class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object # Execute a block operation within a read lock. # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # # @raise [ArgumentError] when no block is given. # @raise [Concurrent::ResourceLimitError] if the maximum number of readers # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:126 def with_read_lock; end # Execute a block operation within a write lock. # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # # @raise [ArgumentError] when no block is given. # @raise [Concurrent::ResourceLimitError] if the maximum number of readers # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:145 def with_write_lock; end private - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:370 def max_readers?(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:375 def max_writers?(c = T.unsafe(nil)); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:345 def running_readers(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:350 def running_readers?(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:355 def running_writer?(c = T.unsafe(nil)); end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:365 def waiting_or_running_writer?(c = T.unsafe(nil)); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:360 def waiting_writers(c = T.unsafe(nil)); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:94 Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:96 Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:84 Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:102 Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:92 Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) # Used with @Counter: +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:90 Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:86 Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) # Used with @HeldCount: +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:100 Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:104 Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) @@ -8812,12 +7978,13 @@ class Concurrent::RejectedExecutionError < ::Concurrent::Error; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:52 class Concurrent::ResourceLimitError < ::Concurrent::Error; end +# @!macro internal_implementation_note +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:129 class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger extend ::Concurrent::Synchronization::SafeInitialization - # @return [RubyExchanger] a new instance of RubyExchanger - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:159 def initialize; end @@ -8841,15 +8008,8 @@ class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger private - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. + # @!macro exchanger_method_do_exchange # - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @param value [Object] the value to exchange with another thread # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:170 @@ -8860,8 +8020,6 @@ end class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization - # @return [Node] a new instance of Node - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:142 def initialize(item); end @@ -8890,67 +8048,37 @@ class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object def value=(value); end end +# @!macro abstract_executor_service_public_api +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:8 class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService - # @return [RubyExecutorService] a new instance of RubyExecutorService - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:11 def initialize(*args, &block); end - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:42 def kill; end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:17 def post(*args, &task); end - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:33 def shutdown; end - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete - # @return [Boolean] `true` if shutdown complete or false on `timeout` - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:52 def wait_for_termination(timeout = T.unsafe(nil)); end private - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:70 def ns_running?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:78 def ns_shutdown?; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:66 def ns_shutdown_execution; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:74 def ns_shuttingdown?; end @@ -8961,148 +8089,77 @@ class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService def stopped_event; end end +# @!macro single_thread_executor +# @!macro abstract_executor_service_public_api +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb:9 class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor include ::Concurrent::SerialExecutorService - # @return [RubySingleThreadExecutor] a new instance of RubySingleThreadExecutor + # @!macro single_thread_executor_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb:13 def initialize(opts = T.unsafe(nil)); end end -# **Thread Pool Options** -# -# Thread pools support several configuration options: -# -# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. -# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and -# a `-worker-` name is given to its threads if supported by used Ruby -# implementation. `` is uniq for each thread. -# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at -# any one time. When the queue size reaches `max_queue` and no new threads can be created, -# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. -# * `auto_terminate`: When true (default), the threads started will be marked as daemon. -# * `fallback_policy`: The policy defining how rejected tasks are handled. -# -# Three fallback policies are supported: -# -# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. -# * `:discard`: Discard the task and return false. -# * `:caller_runs`: Execute the task on the calling thread. -# -# **Shutting Down Thread Pools** -# -# Killing a thread pool while tasks are still being processed, either by calling -# the `#kill` method or at application exit, will have unpredictable results. There -# is no way for the thread pool to know what resources are being used by the -# in-progress tasks. When those tasks are killed the impact on those resources -# cannot be predicted. The *best* practice is to explicitly shutdown all thread -# pools using the provided methods: -# -# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks -# * Call `#wait_for_termination` with an appropriate timeout interval an allow -# the orderly shutdown to complete -# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time -# -# On some runtime platforms (most notably the JVM) the application will not -# exit until all thread pools have been shutdown. To prevent applications from -# "hanging" on exit, all threads can be marked as daemon according to the -# `:auto_terminate` option. -# -# ```ruby -# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon -# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon -# ``` -# -# @note Failure to properly shutdown a thread pool can lead to unpredictable results. -# Please read *Shutting Down Thread Pools* for more information. -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface -# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools -# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# @!macro thread_pool_executor +# @!macro thread_pool_options +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:13 class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService - # @return [RubyThreadPoolExecutor] a new instance of RubyThreadPoolExecutor + # @!macro thread_pool_executor_method_initialize # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:47 def initialize(opts = T.unsafe(nil)); end - # The number of threads that are actively executing tasks. - # - # @return [Integer] The number of threads that are actively executing tasks. + # @!macro thread_pool_executor_method_active_count # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:67 def active_count; end - # Does the task queue have a maximum size? - # - # @return [Boolean] True if the task queue has a maximum size else false. + # @!macro executor_service_method_can_overflow_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:74 def can_overflow?; end - # The number of tasks that have been completed by the pool since construction. - # - # @return [Integer] The number of tasks that have been completed by the pool since construction. + # @!macro thread_pool_executor_attr_reader_completed_task_count # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:62 def completed_task_count; end - # The number of seconds that a thread may be idle before being reclaimed. - # - # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. + # @!macro thread_pool_executor_attr_reader_idletime # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:38 def idletime; end - # The largest number of threads that have been created in the pool since construction. - # - # @return [Integer] The largest number of threads that have been created in the pool since construction. + # @!macro thread_pool_executor_attr_reader_largest_length # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:52 def largest_length; end - # The number of threads currently in the pool. - # - # @return [Integer] The number of threads currently in the pool. + # @!macro thread_pool_executor_attr_reader_length # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:79 def length; end - # The maximum number of threads that may be created in the pool. - # - # @return [Integer] The maximum number of threads that may be created in the pool. + # @!macro thread_pool_executor_attr_reader_max_length # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:32 def max_length; end - # The maximum number of tasks that may be waiting in the work queue at any one time. - # When the queue size reaches `max_queue` subsequent tasks will be rejected in - # accordance with the configured `fallback_policy`. - # - # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. - # When the queue size reaches `max_queue` subsequent tasks will be rejected in - # accordance with the configured `fallback_policy`. + # @!macro thread_pool_executor_attr_reader_max_queue # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:41 def max_queue; end - # The minimum number of threads that may be retained in the pool. - # - # @return [Integer] The minimum number of threads that may be retained in the pool. + # @!macro thread_pool_executor_attr_reader_min_length # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:35 def min_length; end - # Prune the thread pool of unneeded threads - # - # What is being pruned is controlled by the min_threads and idletime - # parameters passed at pool creation time - # - # This is a no-op on all pool implementations as they prune themselves - # automatically, and has been deprecated. + # @!macro thread_pool_executor_method_prune_pool # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:139 def prune_pool; end @@ -9111,151 +8168,171 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService # # @return [true, false] if the worker was pruned # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:104 def prune_worker(worker); end - # The number of tasks in the queue awaiting execution. - # - # @return [Integer] The number of tasks in the queue awaiting execution. + # @!macro thread_pool_executor_attr_reader_queue_length # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:84 def queue_length; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:124 def ready_worker(worker, last_message); end - # Number of tasks that may be enqueued before reaching `max_queue` and rejecting - # new tasks. A value of -1 indicates that the queue may grow without bound. - # - # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting - # new tasks. A value of -1 indicates that the queue may grow without bound. + # @!macro thread_pool_executor_attr_reader_remaining_capacity # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:89 def remaining_capacity; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:116 def remove_worker(worker); end - # The number of tasks that have been scheduled for execution on the pool since construction. - # - # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. + # @!macro thread_pool_executor_attr_reader_scheduled_task_count # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:57 def scheduled_task_count; end - # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. - # - # @return [true, false] + # @!macro thread_pool_executor_attr_reader_synchronous # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:44 def synchronous; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:129 def worker_died(worker); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:134 def worker_task_completed; end private # creates new worker which has to receive work to do after it's added - # # @return [nil, Worker] nil of max capacity is reached # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:257 def ns_add_busy_worker; end # tries to assign task to a worker, tries to get one from @ready or to create new one - # # @return [true, false] if task is assigned to a worker # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:217 def ns_assign_worker(*args, &task); end # tries to enqueue task - # # @return [true, false] if enqueued # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:235 def ns_enqueue(*args, &task); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:178 def ns_execute(*args, &task); end - # @raise [ArgumentError] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:146 def ns_initialize(opts); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:205 def ns_kill_execution; end - # @return [Boolean] + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:173 def ns_limited_queue?; end # @return [Integer] number of excess idle workers which can be removed without - # going below min_length, or all workers if not running + # going below min_length, or all workers if not running + # + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:305 def ns_prunable_capacity; end # handle ready worker, giving it new job or assigning back to @ready # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:269 def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end # removes a worker which is not tracked in @ready # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:287 def ns_remove_busy_worker(worker); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:294 def ns_remove_ready_worker(worker); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:314 def ns_reset_if_forked; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:190 def ns_shutdown_execution; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:247 def ns_worker_died(worker); end end -# Default maximum number of threads that will be created in the pool. +# @!macro thread_pool_executor_constant_default_max_pool_size # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:17 Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) -# Default maximum number of tasks that may be added to the task queue. +# @!macro thread_pool_executor_constant_default_max_queue_size # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:23 Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) -# Default minimum number of threads that will be retained in the pool. +# @!macro thread_pool_executor_constant_default_min_pool_size # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:20 Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) -# Default value of the :synchronous option. +# @!macro thread_pool_executor_constant_default_synchronous # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:29 Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) -# Default maximum number of seconds a thread in the pool may remain idle -# before being reclaimed. +# @!macro thread_pool_executor_constant_default_thread_timeout # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:26 Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:328 class Concurrent::RubyThreadPoolExecutor::Worker include ::Concurrent::Concern::Logging - # @return [Worker] a new instance of Worker - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:331 def initialize(pool, id); end @@ -9284,8 +8361,6 @@ end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:9 class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject - # @return [SafeTaskExecutor] a new instance of SafeTaskExecutor - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:11 def initialize(task, opts = T.unsafe(nil)); end @@ -9339,6 +8414,8 @@ end # module from the Ruby standard library. With one exception `ScheduledTask` # behaves identically to [Future](Observable) with regard to these modules. # +# @!macro copy_options +# # @example Basic usage # # require 'concurrent/scheduled_task' @@ -9346,21 +8423,21 @@ end # require 'open-uri' # # class Ticker -# def get_year_end_closing(symbol, year, api_key) -# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" -# data = [] -# csv = URI.parse(uri).read -# if csv.include?('call frequency') -# return :rate_limit_exceeded -# end -# CSV.parse(csv, headers: true) do |row| -# data << row['close'].to_f if row['timestamp'].include?(year.to_s) -# end -# year_end = data.first -# year_end -# rescue => e -# p e -# end +# def get_year_end_closing(symbol, year, api_key) +# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" +# data = [] +# csv = URI.parse(uri).read +# if csv.include?('call frequency') +# return :rate_limit_exceeded +# end +# CSV.parse(csv, headers: true) do |row| +# data << row['close'].to_f if row['timestamp'].include?(year.to_s) +# end +# year_end = data.first +# year_end +# rescue => e +# p e +# end # end # # api_key = ENV['ALPHAVANTAGE_KEY'] @@ -9372,26 +8449,29 @@ end # price.pending? #=> true # price.value(0) #=> nil (does not block) # -# sleep(1) # do other stuff +# sleep(1) # do other stuff # # price.value #=> 63.65 (after blocking if necessary) # price.state #=> :fulfilled # price.fulfilled? #=> true # price.value #=> 63.65 -# @example Failed task execution # -# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } -# task.pending? #=> true +# @example Successful task execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.state #=> :unscheduled +# task.execute +# task.state #=> pending # # # wait for it... # sleep(3) # # task.unscheduled? #=> false # task.pending? #=> false -# task.fulfilled? #=> false -# task.rejected? #=> true -# task.value #=> nil -# task.reason #=> # +# task.fulfilled? #=> true +# task.rejected? #=> false +# task.value #=> 'What does the fox say?' +# # @example One line creation and execution # # task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute @@ -9399,27 +8479,28 @@ end # # task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } # task.state #=> pending -# @example Successful task execution # -# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } -# task.state #=> :unscheduled -# task.execute -# task.state #=> pending +# @example Failed task execution +# +# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } +# task.pending? #=> true # # # wait for it... # sleep(3) # # task.unscheduled? #=> false # task.pending? #=> false -# task.fulfilled? #=> true -# task.rejected? #=> false -# task.value #=> 'What does the fox say?' +# task.fulfilled? #=> false +# task.rejected? #=> true +# task.value #=> nil +# task.reason #=> # +# # @example Task execution with observation # # observer = Class.new{ -# def update(time, value, reason) -# puts "The task completed at #{time} with value '#{value}'" -# end +# def update(time, value, reason) +# puts "The task completed at #{time} with value '#{value}'" +# end # }.new # # task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } @@ -9431,6 +8512,9 @@ end # sleep(3) # # #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' +# +# @!macro monotonic_clock_warning +# # @see Concurrent.timer # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:158 @@ -9439,19 +8523,25 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar # Schedule a task for execution at a specified future time. # - # @option opts - # @param delay [Float] the number of seconds to wait for before executing the task - # @param opts [Hash] a customizable set of options + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @yield the task to be performed + # + # @!macro executor_and_deref_options + # + # @option opts [object, Array] :args zero or more arguments to be passed the task + # block on execution + # # @raise [ArgumentError] When no block is given # @raise [ArgumentError] When given a time that is in the past - # @return [ScheduledTask] a new instance of ScheduledTask - # @yield the task to be performed # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:178 def initialize(delay, opts = T.unsafe(nil), &task); end # Comparator which orders by schedule time. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:213 def <=>(other); end @@ -9480,6 +8570,7 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar def execute; end # The executor on which to execute the task. + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:163 def executor; end @@ -9493,6 +8584,8 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar # Execute the task. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:297 def process_task; end @@ -9506,10 +8599,12 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar # Reschedule the task using the given delay and the current time. # A task can only be reset while it is `:pending`. # - # @param delay [Float] the number of seconds to wait for before executing the task - # @raise [ArgumentError] When given a time that is in the past + # @param [Float] delay the number of seconds to wait for before executing the task + # # @return [Boolean] true if successfully rescheduled else false # + # @raise [ArgumentError] When given a time that is in the past + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:262 def reschedule(delay); end @@ -9536,17 +8631,23 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar # Reschedule the task using the given delay and the current time. # A task can only be reset while it is `:pending`. # - # @param delay [Float] the number of seconds to wait for before executing the task + # @param [Float] delay the number of seconds to wait for before executing the task + # # @return [Boolean] true if successfully rescheduled else false # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:326 def ns_reschedule(delay); end # Schedule the task using the given delay and the current time. # - # @param delay [Float] the number of seconds to wait for before executing the task + # @param [Float] delay the number of seconds to wait for before executing the task + # # @return [Boolean] true if successfully rescheduled else false # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:312 def ns_schedule(delay); end @@ -9560,46 +8661,53 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar # Create a new `ScheduledTask` object with the given block, execute it, and return the # `:pending` object. # - # @param delay [Float] the number of seconds to wait for before executing the task - # @raise [ArgumentError] if no block is given + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @!macro executor_and_deref_options + # # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state # + # @raise [ArgumentError] if no block is given + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:290 def execute(delay, opts = T.unsafe(nil), &task); end end end -# A counting semaphore. Conceptually, a semaphore maintains a set of -# permits. Each {#acquire} blocks if necessary until a permit is -# available, and then takes it. Each {#release} adds a permit, potentially -# releasing a blocking acquirer. -# However, no actual permit objects are used; the Semaphore just keeps a -# count of the number available and acts accordingly. -# Alternatively, permits may be acquired within a block, and automatically -# released after the block finishes executing. +# @!macro semaphore +# +# A counting semaphore. Conceptually, a semaphore maintains a set of +# permits. Each {#acquire} blocks if necessary until a permit is +# available, and then takes it. Each {#release} adds a permit, potentially +# releasing a blocking acquirer. +# However, no actual permit objects are used; the Semaphore just keeps a +# count of the number available and acts accordingly. +# Alternatively, permits may be acquired within a block, and automatically +# released after the block finishes executing. # +# @!macro semaphore_public_api # @example # semaphore = Concurrent::Semaphore.new(2) # # t1 = Thread.new do -# semaphore.acquire -# puts "Thread 1 acquired semaphore" +# semaphore.acquire +# puts "Thread 1 acquired semaphore" # end # # t2 = Thread.new do -# semaphore.acquire -# puts "Thread 2 acquired semaphore" +# semaphore.acquire +# puts "Thread 2 acquired semaphore" # end # # t3 = Thread.new do -# semaphore.acquire -# puts "Thread 3 acquired semaphore" +# semaphore.acquire +# puts "Thread 3 acquired semaphore" # end # # t4 = Thread.new do -# sleep(2) -# puts "Thread 4 releasing semaphore" -# semaphore.release +# sleep(2) +# puts "Thread 4 releasing semaphore" +# semaphore.release # end # # [t1, t2, t3, t4].each(&:join) @@ -9609,12 +8717,13 @@ end # # Thread 2 acquired semaphore # # Thread 4 releasing semaphore # # Thread 1 acquired semaphore +# # @example # semaphore = Concurrent::Semaphore.new(1) # # puts semaphore.available_permits # semaphore.acquire do -# puts semaphore.available_permits +# puts semaphore.available_permits # end # puts semaphore.available_permits # @@ -9626,6 +8735,9 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/semaphore.rb:161 class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/semaphore.rb:96 Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore @@ -9638,7 +8750,7 @@ Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore # # @example # class Foo -# include Concurrent::SerialExecutor +# include Concurrent::SerialExecutor # end # # foo = Foo.new @@ -9647,17 +8759,16 @@ Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore # foo.is_a? Concurrent::SerialExecutor #=> true # foo.serialized? #=> true # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb:24 module Concurrent::SerialExecutorService include ::Concurrent::Concern::Logging include ::Concurrent::ExecutorService - # Does this executor guarantee serialization of its operations? + # @!macro executor_service_method_serialized_question # # @note Always returns `true` - # @return [Boolean] True if the executor guarantees that all operations - # will be post in the order they are received and no two operations may - # occur simultaneously. Else false. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb:30 def serialized?; end @@ -9669,19 +8780,21 @@ end class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject include ::Concurrent::Concern::Logging - # @return [SerializedExecution] a new instance of SerializedExecution - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:11 def initialize; end # Submit a task to the executor for asynchronous processing. # - # @param args [Array] zero or more arguments to be passed to the task - # @param executor [Executor] to be used for this job - # @raise [ArgumentError] if no task is given + # @param [Executor] executor to be used for this job + # + # @param [Array] args zero or more arguments to be passed to the task + # + # @yield the asynchronous task to perform + # # @return [Boolean] `true` if the task is queued, `false` if the executor # is not running - # @yield the asynchronous task to perform + # + # @raise [ArgumentError] if no task is given # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:34 def post(executor, *args, &task); end @@ -9689,7 +8802,7 @@ class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableO # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not # be interleaved by other tasks. # - # @param posts [Array, Proc)>] array of triplets where + # @param [Array, Proc)>] posts array of triplets where # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:44 @@ -9711,51 +8824,24 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 class Concurrent::SerializedExecution::Job < ::Struct - # Returns the value of attribute args - # - # @return [Object] the current value of args - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 def args; end - # Sets the attribute args - # - # @param value [Object] the value to set the attribute args to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 def args=(_); end - # Returns the value of attribute block - # - # @return [Object] the current value of block - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 def block; end - # Sets the attribute block - # - # @param value [Object] the value to set the attribute block to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 def block=(_); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:17 def call; end - # Returns the value of attribute executor - # - # @return [Object] the current value of executor - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 def executor; end - # Sets the attribute executor - # - # @param value [Object] the value to set the attribute executor to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 def executor=(_); end @@ -9780,8 +8866,8 @@ end # A wrapper/delegator for any `ExecutorService` that # guarantees serialized execution of tasks. # -# @see Concurrent::SerializedExecution # @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) +# @see Concurrent::SerializedExecution # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb:12 class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator @@ -9789,38 +8875,22 @@ class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator include ::Concurrent::ExecutorService include ::Concurrent::SerialExecutorService - # @return [SerializedExecutionDelegator] a new instance of SerializedExecutionDelegator - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb:15 def initialize(executor); end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform + # @!macro executor_service_method_post # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb:22 def post(*args, &task); end end -# A thread-safe subclass of Set. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`. -# -# @note `a += b` is **not** a **thread-safe** operation on -# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` -# which is union of `a` and `b`, then it writes the union to `a`. -# The read and write are independent operations they do not form a single atomic -# operation therefore when two `+=` operations are executed concurrently updates -# may be lost. Use `#merge` instead. -# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` +# @!macro concurrent_set # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:61 class Concurrent::Set < ::Concurrent::CRubySet; end +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:23 Concurrent::SetImplementation = Concurrent::CRubySet @@ -9829,172 +8899,85 @@ Concurrent::SetImplementation = Concurrent::CRubySet # or any time thereafter. Attempting to assign a value to a member # that has already been set will result in a `Concurrent::ImmutabilityError`. # -# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword # @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:14 module Concurrent::SettableStruct include ::Concurrent::Synchronization::AbstractStruct - # Equality - # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) + # @!macro struct_equality # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:50 def ==(other); end - # Attribute Reference - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. + # @!macro struct_get # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:45 def [](member); end - # Attribute Assignment + # @!macro struct_set # - # Sets the value of the given struct member or the member at the given index. - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the name does not exist - # @raise [IndexError] if the index is out of range. # @raise [Concurrent::ImmutabilityError] if the given member has already been set - # @return [Object] the value of the given struct member or the member at the given index. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:75 def []=(member, value); end - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. - # - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) + # @!macro struct_each # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:55 def each(&block); end - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. - # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam member [Object] each struct member (in order) - # @yieldparam value [Object] each struct value (in order) + # @!macro struct_each_pair # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:61 def each_pair(&block); end - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string + # @!macro struct_inspect # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:29 def inspect; end - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. - # - # @param other [Hash] the hash from which to set the new values - # @raise [ArgumentError] of given a member that is not defined in the struct - # @return [Synchronization::AbstractStruct] a new struct with the new values - # @yield an options block for resolving duplicate keys - # @yieldparam member [String, Symbol] the name of the member which is duplicated - # @yieldparam othervalue [Object] the value of the member in `other` - # @yieldparam selfvalue [Object] the value of the member in `self` + # @!macro struct_merge # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:35 def merge(other, &block); end - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). - # - # @return [Array] an array containing each value for which the block returns true - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) + # @!macro struct_select # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:67 def select(&block); end - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:21 def to_a; end - # Returns a hash containing the names and values for the struct’s members. - # - # @return [Hash] the names and values for the struct’s members + # @!macro struct_to_h # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:40 def to_h; end - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:32 def to_s; end - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct + # @!macro struct_values # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:18 def values; end - # Returns the struct member values for each selector as an Array. - # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). - # - # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # @!macro struct_values_at # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:24 def values_at(*indexes); end private + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:97 def initialize_copy(original); end class << self - # Factory for creating new struct classes. - # - # ``` - # new([class_name] [, member_name]+>) -> StructClass click to toggle source - # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass - # new(value, ...) -> obj - # StructClass[value, ...] -> obj - # ``` - # - # The first two forms are used to create a new struct subclass `class_name` - # that can contain a value for each member_name . This subclass can be - # used to create instances of the structure like any other Class . - # - # If the `class_name` is omitted an anonymous struct class will be created. - # Otherwise, the name of this struct will appear as a constant in the struct class, - # so it must be unique for all structs under this base class and must start with a - # capital letter. Assigning a struct class to a constant also gives the class - # the name of the constant. - # - # If a block is given it will be evaluated in the context of `StructClass`, passing - # the created class as a parameter. This is the recommended way to customize a struct. - # Subclassing an anonymous struct creates an extra anonymous class that will never be used. - # - # The last two forms create a new instance of a struct subclass. The number of value - # parameters must be less than or equal to the number of attributes defined for the - # struct. Unset parameters default to nil. Passing more parameters than number of attributes - # will raise an `ArgumentError`. - # - # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # @!macro struct_new # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:105 def new(*args, &block); end @@ -10019,68 +9002,42 @@ Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:21 class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself + # @!macro executor_service_method_left_shift # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:56 def <<(task); end - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. + # @!macro executor_service_method_kill # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:84 def kill; end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform + # @!macro executor_service_method_post # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:40 def post(*args, &task); end - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # @!macro executor_service_method_running_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:62 def running?; end - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. + # @!macro executor_service_method_shutdown # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:77 def shutdown; end - # Is the executor shutdown? - # - # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # @!macro executor_service_method_shutdown_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:72 def shutdown?; end - # Is the executor shuttingdown? - # - # @return [Boolean] `true` when not running and not shutdown, else `false` + # @!macro executor_service_method_shuttingdown_question # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:67 def shuttingdown?; end - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete - # @return [Boolean] `true` if shutdown complete or false on `timeout` + # @!macro executor_service_method_wait_for_termination # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:91 def wait_for_termination(timeout = T.unsafe(nil)); end @@ -10091,42 +9048,37 @@ class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService def ns_initialize(*args); end class << self - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself + # @!macro executor_service_method_left_shift # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:34 def <<(task); end - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform + # @!macro executor_service_method_post # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:24 def post(*args); end end end -# A thread pool with a single thread an unlimited queue. Should the thread -# die for any reason it will be removed and replaced, thus ensuring that -# the executor will always remain viable and available to process jobs. +# @!macro single_thread_executor +# +# A thread pool with a single thread an unlimited queue. Should the thread +# die for any reason it will be removed and replaced, thus ensuring that +# the executor will always remain viable and available to process jobs. # -# A common pattern for background processing is to create a single thread -# on which an infinite loop is run. The thread's loop blocks on an input -# source (perhaps blocking I/O or a queue) and processes each input as it -# is received. This pattern has several issues. The thread itself is highly -# susceptible to errors during processing. Also, the thread itself must be -# constantly monitored and restarted should it die. `SingleThreadExecutor` -# encapsulates all these behaviors. The task processor is highly resilient -# to errors from within tasks. Also, should the thread die it will -# automatically be restarted. +# A common pattern for background processing is to create a single thread +# on which an infinite loop is run. The thread's loop blocks on an input +# source (perhaps blocking I/O or a queue) and processes each input as it +# is received. This pattern has several issues. The thread itself is highly +# susceptible to errors during processing. Also, the thread itself must be +# constantly monitored and restarted should it die. `SingleThreadExecutor` +# encapsulates all these behaviors. The task processor is highly resilient +# to errors from within tasks. Also, should the thread die it will +# automatically be restarted. # -# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# +# @!macro abstract_executor_service_public_api # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb:37 class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end @@ -10134,6 +9086,8 @@ class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb:10 Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:2 module Concurrent::Synchronization class << self @@ -10142,247 +9096,235 @@ module Concurrent::Synchronization end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:9 class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object protected - # Broadcast to all waiting threads. + # @!macro synchronization_object_method_ns_broadcast # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def broadcast - # synchronize { ns_broadcast } - # end - # ``` - # @raise [NotImplementedError] - # @return [self] + # Broadcast to all waiting threads. + # @return [self] + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def broadcast + # synchronize { ns_broadcast } + # end + # ``` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:96 def ns_broadcast; end - # Signal one waiting thread. + # @!macro synchronization_object_method_ns_signal # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def signal - # synchronize { ns_signal } - # end - # ``` - # @raise [NotImplementedError] - # @return [self] + # Signal one waiting thread. + # @return [self] + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def signal + # synchronize { ns_signal } + # end + # ``` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:81 def ns_signal; end - # Wait until another thread calls #signal or #broadcast, - # spurious wake-ups can happen. + # @!macro synchronization_object_method_ns_wait # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def wait(timeout = nil) - # synchronize { ns_wait(timeout) } - # end - # ``` - # @param timeout [Numeric, nil] in seconds, `nil` means no timeout - # @raise [NotImplementedError] - # @return [self] + # Wait until another thread calls #signal or #broadcast, + # spurious wake-ups can happen. + # + # @param [Numeric, nil] timeout in seconds, `nil` means no timeout + # @return [self] + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait(timeout = nil) + # synchronize { ns_wait(timeout) } + # end + # ``` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:66 def ns_wait(timeout = T.unsafe(nil)); end - # Wait until condition is met or timeout passes, - # protects against spurious wake-ups. - # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def wait_until(timeout = nil, &condition) - # synchronize { ns_wait_until(timeout, &condition) } - # end - # ``` - # @param timeout [Numeric, nil] in seconds, `nil` means no timeout - # @return [true, false] if condition met - # @yield condition to be met - # @yieldreturn [true, false] + # @!macro synchronization_object_method_ns_wait_until + # + # Wait until condition is met or timeout passes, + # protects against spurious wake-ups. + # @param [Numeric, nil] timeout in seconds, `nil` means no timeout + # @yield condition to be met + # @yieldreturn [true, false] + # @return [true, false] if condition met + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait_until(timeout = nil, &condition) + # synchronize { ns_wait_until(timeout, &condition) } + # end + # ``` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:37 def ns_wait_until(timeout = T.unsafe(nil), &condition); end - # @note can by made public in descendants if required by `public :synchronize` - # @raise [NotImplementedError] - # @yield runs the block synchronized against this object, - # equivalent of java's `synchronize(this) {}` + # @!macro synchronization_object_method_synchronize + # + # @yield runs the block synchronized against this object, + # equivalent of java's `synchronize(this) {}` + # @note can by made public in descendants if required by `public :synchronize` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:18 def synchronize; end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:6 class Concurrent::Synchronization::AbstractObject - # @return [AbstractObject] a new instance of AbstractObject - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:7 def initialize; end + # @!visibility private # @abstract - # @raise [NotImplementedError] # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:13 def full_memory_barrier; end class << self - # @raise [NotImplementedError] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:17 def attr_volatile(*names); end end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:6 module Concurrent::Synchronization::AbstractStruct + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:9 def initialize(*values); end - # Returns the number of struct members. + # @!macro struct_length # - # @return [Fixnum] the number of struct members + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:19 def length; end - # Returns the struct members as an array of symbols. + # @!macro struct_members + # + # Returns the struct members as an array of symbols. # - # @return [Array] the struct members as an array of symbols + # @return [Array] the struct members as an array of symbols # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:29 def members; end - # Returns the number of struct members. - # - # @return [Fixnum] the number of struct members - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:22 def size; end protected - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. + # @!macro struct_each # - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:82 def ns_each; end - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. + # @!macro struct_each_pair # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam member [Object] each struct member (in order) - # @yieldparam value [Object] each struct value (in order) + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:89 def ns_each_pair; end - # Equality + # @!macro struct_equality # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:75 def ns_equality(other); end - # Attribute Reference + # @!macro struct_get # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:59 def ns_get(member); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:119 def ns_initialize_copy; end - # Describe the contents of this struct in a string. + # @!macro struct_inspect # - # @return [String] the contents of this struct in a string + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:105 def ns_inspect; end - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. + # @!macro struct_merge # - # @param other [Hash] the hash from which to set the new values - # @raise [ArgumentError] of given a member that is not defined in the struct - # @return [Synchronization::AbstractStruct] a new struct with the new values - # @yield an options block for resolving duplicate keys - # @yieldparam member [String, Symbol] the name of the member which is duplicated - # @yieldparam othervalue [Object] the value of the member in `other` - # @yieldparam selfvalue [Object] the value of the member in `self` + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:114 def ns_merge(other, &block); end - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). + # @!macro struct_select # - # @return [Array] an array containing each value for which the block returns true - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:98 def ns_select; end - # Returns a hash containing the names and values for the struct’s members. + # @!macro struct_to_h # - # @return [Hash] the names and values for the struct’s members + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:52 def ns_to_h; end - # Returns the values for this struct as an Array. + # @!macro struct_values # - # @return [Array] the values for this struct + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:38 def ns_values; end - # Returns the struct member values for each selector as an Array. - # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # @!macro struct_values_at # - # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:45 def ns_values_at(indexes); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:130 def pr_underscore(clazz); end class << self + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:141 def define_struct_class(parent, base, name, members, &block); end end end +# @!visibility private # TODO (pitr-ch 04-Dec-2016): should be in edge # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:8 class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject - # @return [Condition] a new instance of Condition - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:18 def initialize(lock); end @@ -10421,6 +9363,9 @@ class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::Lo end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:8 module Concurrent::Synchronization::ConditionSignalling protected @@ -10432,6 +9377,7 @@ module Concurrent::Synchronization::ConditionSignalling def ns_signal; end end +# @!visibility private # TODO (pitr-ch 04-Dec-2016): should be in edge # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:8 @@ -10464,7 +9410,7 @@ class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::Lockabl def wait_until(timeout = T.unsafe(nil), &condition); end end -# Safe synchronization under any Ruby implementation. +# Safe synchronization under any Ruby implementation. # It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. # Provides a single layer which can improve its implementation over time without changes needed to # the classes using it. Use {Synchronization::Object} not this abstract class. @@ -10489,22 +9435,28 @@ end # end # end # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb:50 class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:57 def new_condition; end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb:11 Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:60 class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject include ::Concurrent::Synchronization::ConditionSignalling extend ::Concurrent::Synchronization::SafeInitialization - # @return [MonitorLockableObject] a new instance of MonitorLockableObject - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:65 def initialize; end @@ -10513,8 +9465,6 @@ class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchro # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:83 def ns_wait(timeout = T.unsafe(nil)); end - # TODO may be a problem with lock.synchronize { lock.wait } - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:79 def synchronize; end @@ -10524,13 +9474,14 @@ class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchro def initialize_copy(other); end end +# @!visibility private +# @!macro internal_implementation_note +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:25 class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject include ::Concurrent::Synchronization::ConditionSignalling extend ::Concurrent::Synchronization::SafeInitialization - # @return [MutexLockableObject] a new instance of MutexLockableObject - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:30 def initialize; end @@ -10552,6 +9503,7 @@ end # - final instance variables see {Object.safe_initialization!} # - volatile instance variables see {Object.attr_volatile} # - volatile instance variables see {Object.attr_atomic} +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:15 class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject @@ -10560,8 +9512,6 @@ class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::Abstr # Has to be called by children. # - # @return [Object] a new instance of Object - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:28 def initialize; end @@ -10576,7 +9526,7 @@ class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::Abstr # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:125 def atomic_attribute?(name); end - # @param inherited [true, false] should inherited volatile with CAS fields be returned? + # @param [true, false] inherited should inherited volatile with CAS fields be returned? # @return [::Array] Returns defined volatile with CAS fields on this class. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:119 @@ -10588,16 +9538,31 @@ class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::Abstr # This method generates following methods: `value`, `value=(new_value) #=> new_value`, # `swap_value(new_value) #=> old_value`, # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. - # - # @param names [::Array] of the instance variables to be volatile with CAS. + # @param [::Array] names of the instance variables to be volatile with CAS. # @return [::Array] names of defined method names. + # @!macro attr_atomic + # @!method $1 + # @return [Object] The $1. + # @!method $1=(new_$1) + # Set the $1. + # @return [Object] new_$1. + # @!method swap_$1(new_$1) + # Set the $1 to new_$1 and return the old $1. + # @return [Object] old $1 + # @!method compare_and_set_$1(expected_$1, new_$1) + # Sets the $1 to new_$1 if the current $1 is expected_$1 + # @return [true, false] + # @!method update_$1(&block) + # Updates the $1 using the block. + # @yield [Object] Calculate a new $1 using given (old) $1 + # @yieldparam [Object] old $1 + # @return [Object] new $1 # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:84 def attr_atomic(*names); end # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains # any instance variables with CamelCase names and isn't {.safe_initialization?}. - # # @raise when offend found # @return [true] # @@ -10607,8 +9572,6 @@ class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::Abstr # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:33 def safe_initialization!; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:37 def safe_initialization?; end @@ -10619,6 +9582,9 @@ class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::Abstr end end +# @!visibility private +# @!macro internal_implementation_note +# # By extending this module, a class and all its children are marked to be constructed safely. Meaning that # all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures # same behaviour as Java's final fields. @@ -10628,15 +9594,15 @@ end # # @example # class AClass < Concurrent::Synchronization::Object -# extend Concurrent::Synchronization::SafeInitialization +# extend Concurrent::Synchronization::SafeInitialization # -# def initialize -# @AFinalValue = 'value' # published safely, #foo will never return nil -# end +# def initialize +# @AFinalValue = 'value' # published safely, #foo will never return nil +# end # -# def foo -# @AFinalValue -# end +# def foo +# @AFinalValue +# end # end # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb:28 @@ -10647,22 +9613,24 @@ end # Volatile adds the attr_volatile class method when included. # +# @example +# class Foo +# include Concurrent::Synchronization::Volatile +# +# attr_volatile :bar +# +# def initialize +# self.bar = 1 +# end +# end +# # foo = Foo.new # foo.bar # => 1 # foo.bar = 2 # => 2 # -# @example -# class Foo -# include Concurrent::Synchronization::Volatile -# -# attr_volatile :bar -# -# def initialize -# self.bar = 1 -# end -# end +# @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:28 module Concurrent::Synchronization::Volatile @@ -10672,8 +9640,6 @@ module Concurrent::Synchronization::Volatile def full_memory_barrier; end class << self - # @private - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:29 def included(base); end end @@ -10700,10 +9666,10 @@ end # This class is currently being considered for inclusion into stdlib, via # https://bugs.ruby-lang.org/issues/8556 # +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:21 class Concurrent::SynchronizedDelegator < ::SimpleDelegator - # @return [SynchronizedDelegator] a new instance of SynchronizedDelegator - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:31 def initialize(obj); end @@ -10720,38 +9686,8 @@ end # A `TVar` is a transactional variable - a single-element container that # is used as part of a transaction - see `Concurrent::atomically`. # +# @!macro thread_safe_variable_comparison # -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. # {include:file:docs-source/tvar.md} # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:12 @@ -10760,17 +9696,21 @@ class Concurrent::TVar < ::Concurrent::Synchronization::Object # Create a new `TVar` with an initial value. # - # @return [TVar] a new instance of TVar - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:16 def initialize(value); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:46 def unsafe_lock; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:36 def unsafe_value; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:41 def unsafe_value=(value); end @@ -10798,57 +9738,27 @@ end # * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). # `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. # -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. +# @!macro thread_safe_variable_comparison # # @example # v = ThreadLocalVar.new(14) # v.value #=> 14 # v.value = 2 # v.value #=> 2 +# # @example # v = ThreadLocalVar.new(14) # # t1 = Thread.new do -# v.value #=> 14 -# v.value = 1 -# v.value #=> 1 +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 # end # # t2 = Thread.new do -# v.value #=> 14 -# v.value = 2 -# v.value #=> 2 +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 # end # # v.value #=> 14 @@ -10857,10 +9767,9 @@ end class Concurrent::ThreadLocalVar # Creates a thread local variable. # - # @param default [Object] the default value when otherwise unset - # @param default_block [Proc] Optional block that gets called to obtain the + # @param [Object] default the default value when otherwise unset + # @param [Proc] default_block Optional block that gets called to obtain the # default value for each thread - # @return [ThreadLocalVar] a new instance of ThreadLocalVar # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:51 def initialize(default = T.unsafe(nil), &default_block); end @@ -10868,9 +9777,9 @@ class Concurrent::ThreadLocalVar # Bind the given value to thread local storage during # execution of the given block. # - # @param value [Object] the value to bind - # @return [Object] the value + # @param [Object] value the value to bind # @yield the operation to be performed with the bound variable + # @return [Object] the value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:88 def bind(value); end @@ -10884,7 +9793,7 @@ class Concurrent::ThreadLocalVar # Sets the current thread's copy of this thread-local variable to the specified value. # - # @param value [Object] the value to set + # @param [Object] value the value to set # @return [Object] the new value # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:78 @@ -10892,6 +9801,8 @@ class Concurrent::ThreadLocalVar protected + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:103 def default; end end @@ -10899,6 +9810,8 @@ end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:44 Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) +# @!visibility private +# @!macro internal_implementation_note # An array-backed storage of indexed variables per thread. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:141 @@ -10910,89 +9823,44 @@ class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals def locals!; end end -# An abstraction composed of one or more threads and a task queue. Tasks -# (blocks or `proc` objects) are submitted to the pool and added to the queue. -# The threads in the pool remove the tasks and execute them in the order -# they were received. -# -# A `ThreadPoolExecutor` will automatically adjust the pool size according -# to the bounds set by `min-threads` and `max-threads`. When a new task is -# submitted and fewer than `min-threads` threads are running, a new thread -# is created to handle the request, even if other worker threads are idle. -# If there are more than `min-threads` but less than `max-threads` threads -# running, a new thread will be created only if the queue is full. -# -# Threads that are idle for too long will be garbage collected, down to the -# configured minimum options. Should a thread crash it, too, will be garbage collected. -# -# `ThreadPoolExecutor` is based on the Java class of the same name. From -# the official Java documentation; -# -# > Thread pools address two different problems: they usually provide -# > improved performance when executing large numbers of asynchronous tasks, -# > due to reduced per-task invocation overhead, and they provide a means -# > of bounding and managing the resources, including threads, consumed -# > when executing a collection of tasks. Each ThreadPoolExecutor also -# > maintains some basic statistics, such as the number of completed tasks. -# > -# > To be useful across a wide range of contexts, this class provides many -# > adjustable parameters and extensibility hooks. However, programmers are -# > urged to use the more convenient Executors factory methods -# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), -# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single -# > background thread), that preconfigure settings for the most common usage -# > scenarios. -# -# **Thread Pool Options** -# -# Thread pools support several configuration options: -# -# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. -# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and -# a `-worker-` name is given to its threads if supported by used Ruby -# implementation. `` is uniq for each thread. -# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at -# any one time. When the queue size reaches `max_queue` and no new threads can be created, -# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. -# * `auto_terminate`: When true (default), the threads started will be marked as daemon. -# * `fallback_policy`: The policy defining how rejected tasks are handled. -# -# Three fallback policies are supported: -# -# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. -# * `:discard`: Discard the task and return false. -# * `:caller_runs`: Execute the task on the calling thread. -# -# **Shutting Down Thread Pools** -# -# Killing a thread pool while tasks are still being processed, either by calling -# the `#kill` method or at application exit, will have unpredictable results. There -# is no way for the thread pool to know what resources are being used by the -# in-progress tasks. When those tasks are killed the impact on those resources -# cannot be predicted. The *best* practice is to explicitly shutdown all thread -# pools using the provided methods: -# -# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks -# * Call `#wait_for_termination` with an appropriate timeout interval an allow -# the orderly shutdown to complete -# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time -# -# On some runtime platforms (most notably the JVM) the application will not -# exit until all thread pools have been shutdown. To prevent applications from -# "hanging" on exit, all threads can be marked as daemon according to the -# `:auto_terminate` option. +# @!macro thread_pool_executor # -# ```ruby -# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon -# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon -# ``` +# An abstraction composed of one or more threads and a task queue. Tasks +# (blocks or `proc` objects) are submitted to the pool and added to the queue. +# The threads in the pool remove the tasks and execute them in the order +# they were received. +# +# A `ThreadPoolExecutor` will automatically adjust the pool size according +# to the bounds set by `min-threads` and `max-threads`. When a new task is +# submitted and fewer than `min-threads` threads are running, a new thread +# is created to handle the request, even if other worker threads are idle. +# If there are more than `min-threads` but less than `max-threads` threads +# running, a new thread will be created only if the queue is full. +# +# Threads that are idle for too long will be garbage collected, down to the +# configured minimum options. Should a thread crash it, too, will be garbage collected. +# +# `ThreadPoolExecutor` is based on the Java class of the same name. From +# the official Java documentation; # -# @note Failure to properly shutdown a thread pool can lead to unpredictable results. -# Please read *Shutting Down Thread Pools* for more information. -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface -# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools -# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# > Thread pools address two different problems: they usually provide +# > improved performance when executing large numbers of asynchronous tasks, +# > due to reduced per-task invocation overhead, and they provide a means +# > of bounding and managing the resources, including threads, consumed +# > when executing a collection of tasks. Each ThreadPoolExecutor also +# > maintains some basic statistics, such as the number of completed tasks. +# > +# > To be useful across a wide range of contexts, this class provides many +# > adjustable parameters and extensibility hooks. However, programmers are +# > urged to use the more convenient Executors factory methods +# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), +# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single +# > background thread), that preconfigure settings for the most common usage +# > scenarios. +# +# @!macro thread_pool_options +# +# @!macro thread_pool_executor_public_api # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb:56 class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end @@ -11000,9 +9868,23 @@ class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb:10 Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:4 module Concurrent::ThreadSafe; end +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:7 module Concurrent::ThreadSafe::Util class << self @@ -11039,13 +9921,19 @@ class Concurrent::TimeoutError < ::Concurrent::Error; end # # @see Concurrent::ScheduledTask # +# @!macro monotonic_clock_warning +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:19 class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # Create a new set of timed tasks. # - # @option opts - # @param opts [Hash] the options used to specify the executor on which to perform actions - # @return [TimerSet] a new instance of TimerSet + # @!macro executor_options + # + # @param [Hash] opts the options used to specify the executor on which to perform actions + # @option opts [Executor] :executor when set use the given `Executor` instance. + # Three special values are also supported: `:task` returns the global task pool, + # `:operation` returns the global operation pool, and `:immediate` returns a new + # `ImmediateExecutor` object. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:30 def initialize(opts = T.unsafe(nil)); end @@ -11062,13 +9950,16 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # delay is less than 1/100th of a second the task will be immediately post # to the executor. # - # @param args [Array] the arguments passed to the task on execution. - # @param delay [Float] the number of seconds to wait for before executing the task. - # @raise [ArgumentError] if the intended execution time is not in the future. - # @raise [ArgumentError] if no block is given. + # @param [Float] delay the number of seconds to wait for before executing the task. + # @param [Array] args the arguments passed to the task on execution. + # + # @yield the task to be performed. + # # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post # is successful; false after shutdown. - # @yield the task to be performed. + # + # @raise [ArgumentError] if the intended execution time is not in the future. + # @raise [ArgumentError] if no block is given. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:48 def post(delay, *args, &task); end @@ -11080,11 +9971,14 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # Initialize the object. # - # @param opts [Hash] the options to create the object with. + # @param [Hash] opts the options to create the object with. + # @!visibility private # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:75 def ns_initialize(opts); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:95 def ns_post_task(task); end @@ -11093,6 +9987,8 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # `ExecutorService` callback called during shutdown. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:123 def ns_shutdown_execution; end @@ -11102,6 +9998,8 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # only. It is not intended to be used directly. Post a task # by using the `SchedulesTask#execute` method. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:90 def post_task(task); end @@ -11110,6 +10008,8 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # garbage collection can occur. If there are no ready tasks it will sleep # for up to 60 seconds waiting for the next scheduled task. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:146 def process_tasks; end @@ -11119,6 +10019,8 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService # only. It is not intended to be used directly. Cancel a task # by using the `ScheduledTask#cancel` method. # + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:116 def remove_task(task); end end @@ -11173,6 +10075,8 @@ end # with three arguments: time of execution, the result of the block (or nil on # failure), and any raised exceptions (or nil on success). # +# @!macro copy_options +# # @example Basic usage # task = Concurrent::TimerTask.new{ puts 'Boom!' } # task.execute @@ -11183,26 +10087,46 @@ end # #=> 'Boom!' # # task.shutdown #=> true +# # @example Configuring `:execution_interval` # task = Concurrent::TimerTask.new(execution_interval: 5) do -# puts 'Boom!' -# end +# puts 'Boom!' +# end # # task.execution_interval #=> 5 +# +# @example Immediate execution with `:run_now` +# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } +# task.execute +# +# #=> 'Boom!' +# # @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay # task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do -# puts 'Boom!' -# end +# puts 'Boom!' +# end # task.interval_type #=> :fixed_rate +# +# @example Last `#value` and `Dereferenceable` mixin +# task = Concurrent::TimerTask.new( +# dup_on_deref: true, +# execution_interval: 5 +# ){ Time.now } +# +# task.execute +# Time.now #=> 2013-11-07 18:06:50 -0500 +# sleep(10) +# task.value #=> 2013-11-07 18:06:55 -0500 +# # @example Controlling execution from within the block # timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| -# task.execution_interval.to_i.times{ print 'Boom! ' } -# print "\n" -# task.execution_interval += 1 -# if task.execution_interval > 5 -# puts 'Stopping...' -# task.shutdown -# end +# task.execution_interval.to_i.times{ print 'Boom! ' } +# print "\n" +# task.execution_interval += 1 +# if task.execution_interval > 5 +# puts 'Stopping...' +# task.shutdown +# end # end # # timer_task.execute @@ -11212,30 +10136,16 @@ end # #=> Boom! Boom! Boom! Boom! # #=> Boom! Boom! Boom! Boom! Boom! # #=> Stopping... -# @example Immediate execution with `:run_now` -# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } -# task.execute -# -# #=> 'Boom!' -# @example Last `#value` and `Dereferenceable` mixin -# task = Concurrent::TimerTask.new( -# dup_on_deref: true, -# execution_interval: 5 -# ){ Time.now } # -# task.execute -# Time.now #=> 2013-11-07 18:06:50 -0500 -# sleep(10) -# task.value #=> 2013-11-07 18:06:55 -0500 # @example Observation # class TaskObserver -# def update(time, result, ex) -# if result -# print "(#{time}) Execution successfully returned #{result}\n" -# else -# print "(#{time}) Execution failed with error #{ex}\n" -# end -# end +# def update(time, result, ex) +# if result +# print "(#{time}) Execution successfully returned #{result}\n" +# else +# print "(#{time}) Execution failed with error #{ex}\n" +# end +# end # end # # task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } @@ -11265,8 +10175,9 @@ end # #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError # #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError # task.shutdown -# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html +# # @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:166 class Concurrent::TimerTask < ::Concurrent::RubyExecutorService @@ -11275,49 +10186,66 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # Create a new TimerTask with the given task and configuration. # - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining task execution. - # @raise ArgumentError when no block is given. - # @return [TimerTask] the new `TimerTask` - # @yield to the block after :execution_interval seconds have passed since - # the last yield - # @yieldparam task a reference to the `TimerTask` instance so that the - # block can control its own lifecycle. Necessary since `self` will - # refer to the execution context of the block rather than the running - # `TimerTask`. + # @!macro timer_task_initialize + # @param [Hash] opts the options defining task execution. + # @option opts [Float] :execution_interval number of seconds between + # task executions (default: EXECUTION_INTERVAL) + # @option opts [Boolean] :run_now Whether to run the task immediately + # upon instantiation or to wait until the first # execution_interval + # has passed (default: false) + # @options opts [Symbol] :interval_type method to calculate the interval + # between executions, can be either :fixed_rate or :fixed_delay. + # (default: :fixed_delay) + # @option opts [Executor] executor, default is `global_io_executor` + # + # @!macro deref_options + # + # @raise ArgumentError when no block is given. + # + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # @return [TimerTask] the new `TimerTask` # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:210 def initialize(opts = T.unsafe(nil), &task); end # Execute a previously created `TimerTask`. # - # @example Instance and execute in one line - # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute - # task.running? #=> true + # @return [TimerTask] a reference to `self` + # # @example Instance and execute in separate steps # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } # task.running? #=> false # task.execute # task.running? #=> true - # @return [TimerTask] a reference to `self` + # + # @example Instance and execute in one line + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute + # task.running? #=> true # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:236 def execute; end + # @!attribute [rw] execution_interval # @return [Fixnum] Number of seconds after the task completes before the # task is performed again. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:261 def execution_interval; end + # @!attribute [rw] execution_interval # @return [Fixnum] Number of seconds after the task completes before the # task is performed again. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:268 def execution_interval=(value); end + # @!attribute [r] interval_type # @return [Symbol] method to calculate the interval between executions # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:278 @@ -11330,12 +10258,14 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:219 def running?; end + # @!attribute [rw] timeout_interval # @return [Fixnum] Number of seconds the task can run before it is # considered to have failed. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:283 def timeout_interval; end + # @!attribute [rw] timeout_interval # @return [Fixnum] Number of seconds the task can run before it is # considered to have failed. # @@ -11347,45 +10277,45 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:294 def <<(task); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:357 def calculate_next_interval(start_time); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:339 def execute_task(completion, age_when_scheduled); end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:298 def ns_initialize(opts, &task); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:327 def ns_kill_execution; end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:321 def ns_shutdown_execution; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:294 def post(*args, &task); end + # @!visibility private + # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:333 def schedule_next_task(interval = T.unsafe(nil)); end class << self # Create and execute a new `TimerTask`. # + # @!macro timer_task_initialize + # # @example # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } # task.running? #=> true - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining task execution. - # @raise ArgumentError when no block is given. - # @return [TimerTask] the new `TimerTask` - # @yield to the block after :execution_interval seconds have passed since - # the last yield - # @yieldparam task a reference to the `TimerTask` instance so that the - # block can control its own lifecycle. Necessary since `self` will - # refer to the execution context of the block rather than the running - # `TimerTask`. # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:254 def execute(opts = T.unsafe(nil), &task); end @@ -11414,10 +10344,10 @@ Concurrent::TimerTask::FIXED_DELAY = T.let(T.unsafe(nil), Symbol) # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:179 Concurrent::TimerTask::FIXED_RATE = T.let(T.unsafe(nil), Symbol) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:153 class Concurrent::Transaction - # @return [Transaction] a new instance of Transaction - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:162 def initialize; end @@ -11459,33 +10389,15 @@ class Concurrent::Transaction::LeaveError < ::StandardError; end # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 class Concurrent::Transaction::OpenEntry < ::Struct - # Returns the value of attribute modified - # - # @return [Object] the current value of modified - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 def modified; end - # Sets the attribute modified - # - # @param value [Object] the value to set the attribute modified to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 def modified=(_); end - # Returns the value of attribute value - # - # @return [Object] the current value of value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 def value; end - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 def value=(_); end @@ -11518,9 +10430,10 @@ end # tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS # tuple.cas(0, :foo, :baz) #=> false | strong CAS # tuple.get(0) #=> :bar | volatile read -# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable -# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# # @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia +# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:20 class Concurrent::Tuple @@ -11528,29 +10441,21 @@ class Concurrent::Tuple # Create a new tuple of the given size. # - # @param size [Integer] the number of elements in the tuple - # @return [Tuple] a new instance of Tuple + # @param [Integer] size the number of elements in the tuple # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:29 def initialize(size); end - # Set the value at the given index to the new value if and only if the current - # value matches the given old value. - # - # @param i [Integer] the index for the element to set - # @param new_value [Object] the value to set at the given index - # @param old_value [Object] the value to compare against the current value - # @return [Boolean] true if the value at the given element was set else false - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:73 def cas(i, old_value, new_value); end # Set the value at the given index to the new value if and only if the current # value matches the given old value. # - # @param i [Integer] the index for the element to set - # @param new_value [Object] the value to set at the given index - # @param old_value [Object] the value to compare against the current value + # @param [Integer] i the index for the element to set + # @param [Object] old_value the value to compare against the current value + # @param [Object] new_value the value to set at the given index + # # @return [Boolean] true if the value at the given element was set else false # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:69 @@ -11558,14 +10463,14 @@ class Concurrent::Tuple # Calls the given block once for each element in self, passing that element as a parameter. # - # @yieldparam ref [Object] the `Concurrent::AtomicReference` object at the current index + # @yieldparam [Object] ref the `Concurrent::AtomicReference` object at the current index # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:78 def each; end # Get the value of the element at the given index. # - # @param i [Integer] the index from which to retrieve the value + # @param [Integer] i the index from which to retrieve the value # @return [Object] the value at the given index or nil if the index is out of bounds # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:43 @@ -11573,8 +10478,9 @@ class Concurrent::Tuple # Set the element at the given index to the given value # - # @param i [Integer] the index for the element to set - # @param value [Object] the value to set at the given index + # @param [Integer] i the index for the element to set + # @param [Object] value the value to set at the given index + # # @return [Object] the new value of the element at the given index or nil if the index is out of bounds # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:55 @@ -11585,56 +10491,40 @@ class Concurrent::Tuple # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:24 def size; end - # Get the value of the element at the given index. - # - # @param i [Integer] the index from which to retrieve the value - # @return [Object] the value at the given index or nil if the index is out of bounds - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:47 def volatile_get(i); end - # Set the element at the given index to the given value - # - # @param i [Integer] the index for the element to set - # @param value [Object] the value to set at the given index - # @return [Object] the new value of the element at the given index or nil if the index is out of bounds - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:59 def volatile_set(i, value); end end +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:3 module Concurrent::Utility; end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:6 module Concurrent::Utility::EngineDetector - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:7 def on_cruby?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:11 def on_jruby?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:27 def on_linux?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:23 def on_osx?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:15 def on_truffleruby?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:19 def on_windows?; end @@ -11642,15 +10532,13 @@ module Concurrent::Utility::EngineDetector def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end end +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:9 module Concurrent::Utility::NativeExtensionLoader - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:11 def allow_c_extensions?; end - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:15 def c_extensions_loaded?; end @@ -11659,8 +10547,6 @@ module Concurrent::Utility::NativeExtensionLoader private - # @return [Boolean] - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:50 def java_extensions_loaded?; end @@ -11710,10 +10596,10 @@ Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:7 Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) +# @!visibility private +# # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:10 class Concurrent::Utility::ProcessorCounter - # @return [ProcessorCounter] a new instance of ProcessorCounter - # # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:11 def initialize; end diff --git a/sorbet/rbi/gems/config@5.6.1.rbi b/sorbet/rbi/gems/config@5.6.1.rbi index 277b7fa4c..1869a12a3 100644 --- a/sorbet/rbi/gems/config@5.6.1.rbi +++ b/sorbet/rbi/gems/config@5.6.1.rbi @@ -30,9 +30,6 @@ module Config # pkg:gem/config#lib/config.rb:67 def setting_files(config_root, env); end - # @yield [_self] - # @yieldparam _self [Config] the object that the method was called on - # # pkg:gem/config#lib/config.rb:36 def setup; end end @@ -46,8 +43,6 @@ class Config::Configuration < ::Module # initializing a module that can be used to extend # the necessary class with the provided config methods # - # @return [Configuration] a new instance of Configuration - # # pkg:gem/config#lib/config/configuration.rb:7 def initialize(**attributes); end @@ -115,29 +110,21 @@ class Config::Options < ::OpenStruct # pkg:gem/config#lib/config/options.rb:86 def each(*args, &block); end - # @return [Boolean] - # # pkg:gem/config#lib/config/options.rb:13 def empty?; end # pkg:gem/config#lib/config/options.rb:133 def exit!; end - # @return [Boolean] - # # pkg:gem/config#lib/config/options.rb:148 def has_key?(key); end - # @return [Boolean] - # # pkg:gem/config#lib/config/options.rb:144 def key?(key); end # pkg:gem/config#lib/config/options.rb:9 def keys; end - # look through all our sources and rebuild the configuration - # # pkg:gem/config#lib/config/options.rb:63 def load!; end @@ -203,8 +190,6 @@ class Config::Options < ::OpenStruct private - # @return [Boolean] - # # pkg:gem/config#lib/config/options.rb:159 def respond_to_missing?(*args); end end @@ -226,36 +211,24 @@ module Config::Sources; end # # pkg:gem/config#lib/config/sources/env_source.rb:4 class Config::Sources::EnvSource - # @return [EnvSource] a new instance of EnvSource - # # pkg:gem/config#lib/config/sources/env_source.rb:11 def initialize(env, prefix: T.unsafe(nil), separator: T.unsafe(nil), converter: T.unsafe(nil), parse_values: T.unsafe(nil), parse_arrays: T.unsafe(nil)); end - # Returns the value of attribute converter. - # # pkg:gem/config#lib/config/sources/env_source.rb:7 def converter; end # pkg:gem/config#lib/config/sources/env_source.rb:25 def load; end - # Returns the value of attribute parse_arrays. - # # pkg:gem/config#lib/config/sources/env_source.rb:9 def parse_arrays; end - # Returns the value of attribute parse_values. - # # pkg:gem/config#lib/config/sources/env_source.rb:8 def parse_values; end - # Returns the value of attribute prefix. - # # pkg:gem/config#lib/config/sources/env_source.rb:5 def prefix; end - # Returns the value of attribute separator. - # # pkg:gem/config#lib/config/sources/env_source.rb:6 def separator; end @@ -266,8 +239,6 @@ class Config::Sources::EnvSource # pkg:gem/config#lib/config/sources/env_source.rb:82 def __value(v); end - # @return [Boolean] - # # pkg:gem/config#lib/config/sources/env_source.rb:77 def consecutive_numeric_keys?(keys); end @@ -277,20 +248,12 @@ end # pkg:gem/config#lib/config/sources/hash_source.rb:3 class Config::Sources::HashSource - # @return [HashSource] a new instance of HashSource - # # pkg:gem/config#lib/config/sources/hash_source.rb:6 def initialize(hash); end - # Returns the value of attribute hash. - # # pkg:gem/config#lib/config/sources/hash_source.rb:4 def hash; end - # Sets the attribute hash - # - # @param value the value to set the attribute hash to. - # # pkg:gem/config#lib/config/sources/hash_source.rb:4 def hash=(_arg0); end @@ -302,13 +265,9 @@ end # pkg:gem/config#lib/config/sources/yaml_source.rb:6 class Config::Sources::YAMLSource - # @return [YAMLSource] a new instance of YAMLSource - # # pkg:gem/config#lib/config/sources/yaml_source.rb:10 def initialize(path, evaluate_erb: T.unsafe(nil)); end - # Returns the value of attribute evaluate_erb. - # # pkg:gem/config#lib/config/sources/yaml_source.rb:8 def evaluate_erb; end @@ -317,15 +276,9 @@ class Config::Sources::YAMLSource # pkg:gem/config#lib/config/sources/yaml_source.rb:16 def load; end - # Returns the value of attribute path. - # # pkg:gem/config#lib/config/sources/yaml_source.rb:7 def path; end - # Sets the attribute path - # - # @param value the value to set the attribute path to. - # # pkg:gem/config#lib/config/sources/yaml_source.rb:7 def path=(_arg0); end end diff --git a/sorbet/rbi/gems/connection_pool@3.0.2.rbi b/sorbet/rbi/gems/connection_pool@3.0.2.rbi index 23db61062..6128cf53a 100644 --- a/sorbet/rbi/gems/connection_pool@3.0.2.rbi +++ b/sorbet/rbi/gems/connection_pool@3.0.2.rbi @@ -36,9 +36,6 @@ # # pkg:gem/connection_pool#lib/connection_pool/version.rb:1 class ConnectionPool - # @raise [ArgumentError] - # @return [ConnectionPool] a new instance of ConnectionPool - # # pkg:gem/connection_pool#lib/connection_pool.rb:48 def initialize(timeout: T.unsafe(nil), size: T.unsafe(nil), auto_reload_after_fork: T.unsafe(nil), name: T.unsafe(nil), &_arg4); end @@ -63,22 +60,25 @@ class ConnectionPool # Takes an optional block that will be called with the connection to be discarded. # The block should perform any necessary clean-up on the connection. # + # @yield [conn] + # @yieldparam conn [Object] The connection to be discarded. + # @yieldreturn [void] + # + # # Note: This only affects the connection currently checked out by the calling thread. # The connection will be discarded when +checkin+ is called. # + # @return [void] + # # @example # pool.with do |conn| - # begin - # conn.execute("SELECT 1") - # rescue SomeConnectionError - # pool.discard_current_connection # Mark connection as bad - # raise + # begin + # conn.execute("SELECT 1") + # rescue SomeConnectionError + # pool.discard_current_connection # Mark connection as bad + # raise + # end # end - # end - # @return [void] - # @yield [conn] - # @yieldparam conn [Object] The connection to be discarded. - # @yieldreturn [void] # # pkg:gem/connection_pool#lib/connection_pool.rb:107 def discard_current_connection(&block); end @@ -108,8 +108,6 @@ class ConnectionPool # pkg:gem/connection_pool#lib/connection_pool.rb:154 def shutdown(&_arg0); end - # Returns the value of attribute size. - # # pkg:gem/connection_pool#lib/connection_pool.rb:46 def size; end @@ -168,14 +166,9 @@ class ConnectionPool::TimedStack # Creates a new pool with +size+ connections that are created from the given # +block+. # - # @return [TimedStack] a new instance of TimedStack - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:25 def initialize(size: T.unsafe(nil), &block); end - # Returns +obj+ to the stack. Additional kwargs are ignored in TimedStack but may be - # used by subclasses that extend TimedStack. - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:50 def <<(obj, **_arg1); end @@ -186,8 +179,6 @@ class ConnectionPool::TimedStack # Returns +true+ if there are no available connections. # - # @return [Boolean] - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:125 def empty?; end @@ -201,8 +192,6 @@ class ConnectionPool::TimedStack # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:131 def length; end - # Returns the value of attribute max. - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:20 def max; end @@ -210,11 +199,11 @@ class ConnectionPool::TimedStack # immediately returned. If no connection is available within the given # timeout a ConnectionPool::TimeoutError is raised. # - # Other options may be used by subclasses that extend TimedStack. + # @option options [Float] :timeout (0.5) Wait this many seconds for an available entry + # @option options [Class] :exception (ConnectionPool::TimeoutError) Exception class to raise + # if an entry was not available within the timeout period. Use `exception: false` to return nil. # - # @option options - # @option options - # @param options [Hash] a customizable set of options + # Other options may be used by subclasses that extend TimedStack. # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:62 def pop(timeout: T.unsafe(nil), exception: T.unsafe(nil), **_arg2); end @@ -227,8 +216,6 @@ class ConnectionPool::TimedStack # Reaps connections that were checked in more than +idle_seconds+ ago. # - # @raise [ArgumentError] - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:106 def reap(idle_seconds:); end @@ -237,8 +224,6 @@ class ConnectionPool::TimedStack # shutdown will raise +ConnectionPool::PoolShuttingDownError+ unless # +:reload+ is +true+. # - # @raise [ArgumentError] - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:92 def shutdown(reload: T.unsafe(nil), &block); end @@ -248,8 +233,6 @@ class ConnectionPool::TimedStack # # This method must returns true if a connection is available on the stack. # - # @return [Boolean] - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:167 def connection_stored?(**_arg0); end @@ -267,8 +250,6 @@ class ConnectionPool::TimedStack # # Returns true if the first connection in the stack has been idle for more than idle_seconds # - # @return [Boolean] - # # pkg:gem/connection_pool#lib/connection_pool/timed_stack.rb:209 def idle_connections?(idle_seconds); end @@ -320,8 +301,6 @@ ConnectionPool::VERSION = T.let(T.unsafe(nil), String) # pkg:gem/connection_pool#lib/connection_pool/wrapper.rb:2 class ConnectionPool::Wrapper < ::BasicObject - # @return [Wrapper] a new instance of Wrapper - # # pkg:gem/connection_pool#lib/connection_pool/wrapper.rb:5 def initialize(**options, &_arg1); end @@ -337,8 +316,6 @@ class ConnectionPool::Wrapper < ::BasicObject # pkg:gem/connection_pool#lib/connection_pool/wrapper.rb:21 def pool_size; end - # @return [Boolean] - # # pkg:gem/connection_pool#lib/connection_pool/wrapper.rb:29 def respond_to?(id, *_arg1, **_arg2); end @@ -350,8 +327,6 @@ class ConnectionPool::Wrapper < ::BasicObject private - # @return [Boolean] - # # pkg:gem/connection_pool#lib/connection_pool/wrapper.rb:33 def respond_to_missing?(id, *_arg1, **_arg2); end end @@ -361,6 +336,7 @@ ConnectionPool::Wrapper::METHODS = T.let(T.unsafe(nil), Array) module Process extend ::SQLite3::ForkSafety::CoreExt + extend ::Dalli::PIDCache::CoreExt extend ::ConnectionPool::ForkTracker extend ::RedisClient::PIDCache::CoreExt extend ::ActiveSupport::ForkTracker::CoreExt diff --git a/sorbet/rbi/gems/crack@1.0.1.rbi b/sorbet/rbi/gems/crack@1.0.1.rbi index 36980479d..43a14d93e 100644 --- a/sorbet/rbi/gems/crack@1.0.1.rbi +++ b/sorbet/rbi/gems/crack@1.0.1.rbi @@ -38,8 +38,6 @@ end # # pkg:gem/crack#lib/crack/xml.rb:23 class REXMLUtilityNode - # @return [REXMLUtilityNode] a new instance of REXMLUtilityNode - # # pkg:gem/crack#lib/crack/xml.rb:56 def initialize(name, normalized_attributes = T.unsafe(nil)); end @@ -74,11 +72,13 @@ class REXMLUtilityNode # Converts the node into a readable HTML node. # - # @return [String] The HTML node in text form. + # @return The HTML node in text form. # # pkg:gem/crack#lib/crack/xml.rb:179 def to_html; end + # @alias #to_html #to_s + # # pkg:gem/crack#lib/crack/xml.rb:185 def to_s; end @@ -92,10 +92,25 @@ class REXMLUtilityNode # +node+ has #type == "integer", # {{[node.typecast_value("12") #=> 12]}} # - # @note If +self+ does not have a "type" key, or if it's not one of the + # @param value The value that is being typecast. + # + # @details [:type options] + # "integer":: + # converts +value+ to an integer with #to_i + # "boolean":: + # checks whether +value+, after removing spaces, is the literal + # "true" + # "datetime":: + # Parses +value+ using Time.parse, and returns a UTC Time + # "date":: + # Parses +value+ using Date.parse + # + # @return + # The result of typecasting +value+. + # + # @note + # If +self+ does not have a "type" key, or if it's not one of the # options specified above, the raw +value+ will be returned. - # @param value [String] The value that is being typecast. - # @return [Integer, TrueClass, FalseClass, Time, Date, Object] The result of typecasting +value+. # # pkg:gem/crack#lib/crack/xml.rb:157 def typecast_value(value); end @@ -131,15 +146,9 @@ end # # pkg:gem/crack#lib/crack/xml.rb:14 class REXMLUtiliyNodeString < ::String - # Returns the value of attribute attributes. - # # pkg:gem/crack#lib/crack/xml.rb:15 def attributes; end - # Sets the attribute attributes - # - # @param value the value to set the attribute attributes to. - # # pkg:gem/crack#lib/crack/xml.rb:15 def attributes=(_arg0); end end diff --git a/sorbet/rbi/gems/crass@1.0.6.rbi b/sorbet/rbi/gems/crass@1.0.6.rbi index 2a4db6dc2..ef7740f90 100644 --- a/sorbet/rbi/gems/crass@1.0.6.rbi +++ b/sorbet/rbi/gems/crass@1.0.6.rbi @@ -38,8 +38,6 @@ class Crass::Parser # # See {Tokenizer#initialize} for _options_. # - # @return [Parser] a new instance of Parser - # # pkg:gem/crass#lib/crass/parser.rb:126 def initialize(input, options = T.unsafe(nil)); end @@ -236,8 +234,6 @@ Crass::Parser::BLOCK_END_TOKENS = T.let(T.unsafe(nil), Hash) class Crass::Scanner # Creates a Scanner instance for the given _input_ string or IO instance. # - # @return [Scanner] a new instance of Scanner - # # pkg:gem/crass#lib/crass/scanner.rb:25 def initialize(input); end @@ -263,8 +259,6 @@ class Crass::Scanner # Returns `true` if the end of the string has been reached, `false` # otherwise. # - # @return [Boolean] - # # pkg:gem/crass#lib/crass/scanner.rb:57 def eos?; end @@ -347,8 +341,6 @@ end # # pkg:gem/crass#lib/crass/token-scanner.rb:6 class Crass::TokenScanner - # @return [TokenScanner] a new instance of TokenScanner - # # pkg:gem/crass#lib/crass/token-scanner.rb:9 def initialize(tokens); end @@ -364,8 +356,6 @@ class Crass::TokenScanner # pkg:gem/crass#lib/crass/token-scanner.rb:24 def consume; end - # Returns the value of attribute current. - # # pkg:gem/crass#lib/crass/token-scanner.rb:7 def current; end @@ -375,8 +365,6 @@ class Crass::TokenScanner # pkg:gem/crass#lib/crass/token-scanner.rb:32 def peek; end - # Returns the value of attribute pos. - # # pkg:gem/crass#lib/crass/token-scanner.rb:7 def pos; end @@ -392,8 +380,6 @@ class Crass::TokenScanner # pkg:gem/crass#lib/crass/token-scanner.rb:44 def reset; end - # Returns the value of attribute tokens. - # # pkg:gem/crass#lib/crass/token-scanner.rb:7 def tokens; end end @@ -415,8 +401,6 @@ class Crass::Tokenizer # such as the IE "*" hack will be preserved even though they violate # CSS 3 syntax rules. # - # @return [Tokenizer] a new instance of Tokenizer - # # pkg:gem/crass#lib/crass/tokenizer.rb:62 def initialize(input, options = T.unsafe(nil)); end @@ -531,8 +515,6 @@ class Crass::Tokenizer # # 4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier # - # @return [Boolean] - # # pkg:gem/crass#lib/crass/tokenizer.rb:642 def start_identifier?(text = T.unsafe(nil)); end @@ -542,8 +524,6 @@ class Crass::Tokenizer # # 4.3.11. http://dev.w3.org/csswg/css-syntax/#starts-with-a-number # - # @return [Boolean] - # # pkg:gem/crass#lib/crass/tokenizer.rb:666 def start_number?(text = T.unsafe(nil)); end @@ -558,8 +538,6 @@ class Crass::Tokenizer # # 4.3.9. http://dev.w3.org/csswg/css-syntax/#starts-with-a-valid-escape # - # @return [Boolean] - # # pkg:gem/crass#lib/crass/tokenizer.rb:702 def valid_escape?(text = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/dalli@4.3.3.rbi b/sorbet/rbi/gems/dalli@4.3.3.rbi index f974b0ed5..c287426a8 100644 --- a/sorbet/rbi/gems/dalli@4.3.3.rbi +++ b/sorbet/rbi/gems/dalli@4.3.3.rbi @@ -75,8 +75,6 @@ class Dalli::Client # +nil+ (default) omits the attribute entirely. # - :otel_peer_service - when set, adds a +peer.service+ span attribute with this value for logical service naming. # - # @return [Client] a new instance of Client - # # pkg:gem/dalli#lib/dalli/client.rb:58 def initialize(servers = T.unsafe(nil), options = T.unsafe(nil)); end @@ -162,12 +160,12 @@ class Dalli::Client # This method is more efficient than calling delete() in a loop because # it batches requests by server and uses quiet mode. # - # Example: - # client.delete_multi(['key1', 'key2', 'key3']) - # # @param keys [Array] keys to delete # @return [void] # + # Example: + # client.delete_multi(['key1', 'key2', 'key3']) + # # pkg:gem/dalli#lib/dalli/client.rb:380 def delete_multi(keys); end @@ -193,24 +191,27 @@ class Dalli::Client # IMPORTANT: This method requires memcached 1.6+ and the meta protocol (protocol: :meta). # It will raise an error if used with the binary protocol. # - # @example Basic usage - # client.fetch_with_lock('expensive_key', ttl: 300, lock_ttl: 30) do - # expensive_database_query - # end - # @example With proactive recaching (recache before expiry) - # client.fetch_with_lock('key', ttl: 300, lock_ttl: 30, recache_threshold: 60) do - # expensive_operation - # end # @param key [String] the cache key + # @param ttl [Integer] time-to-live for the cached value in seconds # @param lock_ttl [Integer] how long the lock/stub lives (default: 30 seconds) # This is the maximum time other clients will return stale data while # waiting for regeneration. Should be longer than your expected regeneration time. # @param recache_threshold [Integer, nil] if set, win the recache race when the # item's remaining TTL is below this threshold. Useful for proactive recaching. # @param req_options [Hash] options passed to set operations (e.g., raw: true) - # @param ttl [Integer] time-to-live for the cached value in seconds - # @return [Object] the cached value (may be stale if another client is regenerating) + # # @yield Block to regenerate the value (only called if this client won the race) + # @return [Object] the cached value (may be stale if another client is regenerating) + # + # @example Basic usage + # client.fetch_with_lock('expensive_key', ttl: 300, lock_ttl: 30) do + # expensive_database_query + # end + # + # @example With proactive recaching (recache before expiry) + # client.fetch_with_lock('key', ttl: 300, lock_ttl: 30, recache_threshold: 60) do + # expensive_operation + # end # # pkg:gem/dalli#lib/dalli/client.rb:236 def fetch_with_lock(key, ttl: T.unsafe(nil), lock_ttl: T.unsafe(nil), recache_threshold: T.unsafe(nil), req_options: T.unsafe(nil), &block); end @@ -221,9 +222,6 @@ class Dalli::Client # pkg:gem/dalli#lib/dalli/client.rb:447 def flush(delay = T.unsafe(nil)); end - # Flush the memcached server, at 'delay' seconds in the future. - # Delay defaults to zero seconds, which means an immediate flush. - # # pkg:gem/dalli#lib/dalli/client.rb:450 def flush_all(delay = T.unsafe(nil)); end @@ -243,8 +241,6 @@ class Dalli::Client # Get the value and CAS ID associated with the key. If a block is provided, # value and CAS will be passed to the block. # - # @yield [value, cas] - # # pkg:gem/dalli#lib/dalli/client.rb:97 def get_cas(key); end @@ -269,28 +265,31 @@ class Dalli::Client # IMPORTANT: This method requires memcached 1.6+ and the meta protocol (protocol: :meta). # It will raise an error if used with the binary protocol. # - # @example Get with all metadata without affecting LRU - # result = client.get_with_metadata('key', - # return_hit_status: true, - # return_last_access: true, - # skip_lru_bump: true - # ) - # # => { value: "data", cas: 123, hit_before: true, last_access: 42 } - # @example Get with hit status - # result = client.get_with_metadata('key', return_hit_status: true) - # # => { value: "data", cas: 123, hit_before: true } # @param key [String] the cache key # @param options [Hash] options controlling what metadata to return # - :return_cas [Boolean] return the CAS value (default: true) # - :return_hit_status [Boolean] return whether item was previously accessed # - :return_last_access [Boolean] return seconds since last access # - :skip_lru_bump [Boolean] don't bump LRU or update access stats + # # @return [Hash] containing: # - :value - the cached value (or nil on miss) # - :cas - the CAS value # - :hit_before - true/false if previously accessed (only if return_hit_status: true) # - :last_access - seconds since last access (only if return_last_access: true) # + # @example Get with hit status + # result = client.get_with_metadata('key', return_hit_status: true) + # # => { value: "data", cas: 123, hit_before: true } + # + # @example Get with all metadata without affecting LRU + # result = client.get_with_metadata('key', + # return_hit_status: true, + # return_last_access: true, + # skip_lru_bump: true + # ) + # # => { value: "data", cas: 123, hit_before: true, last_access: 42 } + # # pkg:gem/dalli#lib/dalli/client.rb:135 def get_with_metadata(key, options = T.unsafe(nil)); end @@ -310,28 +309,9 @@ class Dalli::Client # pkg:gem/dalli#lib/dalli/client.rb:415 def incr(key, amt = T.unsafe(nil), ttl = T.unsafe(nil), default = T.unsafe(nil)); end - # Turn on quiet aka noreply support for a number of - # memcached operations. - # - # All relevant operations within this block will be effectively - # pipelined as Dalli will use 'quiet' versions. The invoked methods - # will all return nil, rather than their usual response. Method - # latency will be substantially lower, as the caller will not be - # blocking on responses. - # - # Currently supports storage (set, add, replace, append, prepend), - # arithmetic (incr, decr), flush and delete operations. Use of - # unsupported operations inside a block will raise an error. - # - # Any error replies will be discarded at the end of the block, and - # Dalli client methods invoked inside the block will not - # have return values - # # pkg:gem/dalli#lib/dalli/client.rb:305 def multi; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/client.rb:502 def not_found?(val); end @@ -374,9 +354,6 @@ class Dalli::Client # pkg:gem/dalli#lib/dalli/client.rb:356 def replace_cas(key, value, cas, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end - # Close our connection to each server. - # If you perform another operation after this, the connections will be re-established. - # # pkg:gem/dalli#lib/dalli/client.rb:498 def reset; end @@ -398,14 +375,14 @@ class Dalli::Client # This method is more efficient than calling set() in a loop because # it batches requests by server and uses quiet mode. # - # Example: - # client.set_multi({ 'key1' => 'value1', 'key2' => 'value2' }, 300) - # # @param hash [Hash] key-value pairs to set - # @param req_options [Hash] options passed to each set operation # @param ttl [Integer] time-to-live in seconds (optional, uses default if not provided) + # @param req_options [Hash] options passed to each set operation # @return [void] # + # Example: + # client.set_multi({ 'key1' => 'value1', 'key2' => 'value2' }, 300) + # # pkg:gem/dalli#lib/dalli/client.rb:323 def set_multi(hash, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end @@ -430,9 +407,6 @@ class Dalli::Client # Stub method so a bare Dalli client can pretend to be a connection pool. # - # @yield [_self] - # @yieldparam _self [Dalli::Client] the object that the method was called on - # # pkg:gem/dalli#lib/dalli/client.rb:511 def with; end @@ -444,8 +418,6 @@ class Dalli::Client # pkg:gem/dalli#lib/dalli/client.rb:580 def cas_core(key, always_set, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end - # @raise [ArgumentError] - # # pkg:gem/dalli#lib/dalli/client.rb:576 def check_positive!(amt); end @@ -491,16 +463,13 @@ class Dalli::Client # pkg:gem/dalli#lib/dalli/client.rb:613 def protocol_implementation; end - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/client.rb:669 def raise_unless_meta_protocol!; end # Records hit/miss metrics on a span for cache observability. - # - # @param hit_count [Integer] keys found in cache - # @param key_count [Integer] total keys requested # @param span [OpenTelemetry::Trace::Span, nil] the span to record on + # @param key_count [Integer] total keys requested + # @param hit_count [Integer] keys found in cache # # pkg:gem/dalli#lib/dalli/client.rb:521 def record_hit_miss_metrics(span, key_count, hit_count); end @@ -623,20 +592,21 @@ module Dalli::Instrumentation # When tracing is disabled (OpenTelemetry not loaded), this method # simply yields directly with zero overhead. # - # @example Tracing a set operation - # trace('set', { 'db.operation.name' => 'set', 'server.address' => 'localhost', 'server.port' => 11211 }) do - # server.set(key, value, ttl) - # end + # @param name [String] the span name (e.g., 'get', 'set', 'delete') # @param attributes [Hash] span attributes to merge with defaults. # Common attributes include: # - 'db.operation.name' - the operation name # - 'server.address' - the server hostname # - 'server.port' - the server port (integer) # - 'db.memcached.key_count' - number of keys (for multi operations) - # @param name [String] the span name (e.g., 'get', 'set', 'delete') - # @raise [StandardError] re-raises any exception from the block - # @return [Object] the result of the block # @yield the cache operation to trace + # @return [Object] the result of the block + # @raise [StandardError] re-raises any exception from the block + # + # @example Tracing a set operation + # trace('set', { 'db.operation.name' => 'set', 'server.address' => 'localhost', 'server.port' => 11211 }) do + # server.set(key, value, ttl) + # end # # pkg:gem/dalli#lib/dalli/instrumentation.rb:102 def trace(name, attributes = T.unsafe(nil)); end @@ -649,20 +619,21 @@ module Dalli::Instrumentation # # When tracing is disabled, yields nil as the span argument. # + # @param name [String] the span name (e.g., 'get_multi') + # @param attributes [Hash] initial span attributes to merge with defaults + # @yield [OpenTelemetry::Trace::Span, nil] the span object, or nil if disabled + # @return [Object] the result of the block + # @raise [StandardError] re-raises any exception from the block + # # @example Recording hit/miss metrics after get_multi # trace_with_result('get_multi', { 'db.operation.name' => 'get_multi' }) do |span| - # results = fetch_from_cache(keys) - # if span - # span.set_attribute('db.memcached.hit_count', results.size) - # span.set_attribute('db.memcached.miss_count', keys.size - results.size) + # results = fetch_from_cache(keys) + # if span + # span.set_attribute('db.memcached.hit_count', results.size) + # span.set_attribute('db.memcached.miss_count', keys.size - results.size) + # end + # results # end - # results - # end - # @param attributes [Hash] initial span attributes to merge with defaults - # @param name [String] the span name (e.g., 'get_multi') - # @raise [StandardError] re-raises any exception from the block - # @return [Object] the result of the block - # @yield [OpenTelemetry::Trace::Span, nil] the span object, or nil if disabled # # pkg:gem/dalli#lib/dalli/instrumentation.rb:134 def trace_with_result(name, attributes = T.unsafe(nil), &_arg2); end @@ -680,7 +651,6 @@ module Dalli::Instrumentation end # Default attributes included on all memcached spans. -# # @return [Hash] frozen hash with 'db.system.name' => 'memcached' # # pkg:gem/dalli#lib/dalli/instrumentation.rb:55 @@ -693,8 +663,6 @@ Dalli::Instrumentation::DEFAULT_ATTRIBUTES = T.let(T.unsafe(nil), Hash) # # pkg:gem/dalli#lib/dalli/key_manager.rb:12 class Dalli::KeyManager - # @return [KeyManager] a new instance of KeyManager - # # pkg:gem/dalli#lib/dalli/key_manager.rb:36 def initialize(client_options); end @@ -713,8 +681,6 @@ class Dalli::KeyManager # pkg:gem/dalli#lib/dalli/key_manager.rb:74 def key_without_namespace(key); end - # Returns the value of attribute namespace. - # # pkg:gem/dalli#lib/dalli/key_manager.rb:30 def namespace; end @@ -724,8 +690,6 @@ class Dalli::KeyManager # pkg:gem/dalli#lib/dalli/key_manager.rb:84 def namespace_regexp; end - # Returns the value of attribute namespace_separator. - # # pkg:gem/dalli#lib/dalli/key_manager.rb:30 def namespace_separator; end @@ -739,8 +703,6 @@ class Dalli::KeyManager # pkg:gem/dalli#lib/dalli/key_manager.rb:123 def truncated_key(key); end - # @raise [ArgumentError] - # # pkg:gem/dalli#lib/dalli/key_manager.rb:90 def validate_digest_class_option(opts); end @@ -754,13 +716,9 @@ class Dalli::KeyManager # Otherwise computes a "truncated" key that uses a truncated prefix # combined with a 32-byte hex digest of the whole key. # - # @raise [ArgumentError] - # # pkg:gem/dalli#lib/dalli/key_manager.rb:57 def validate_key(key); end - # @raise [ArgumentError] - # # pkg:gem/dalli#lib/dalli/key_manager.rb:96 def validate_namespace_separator_option(opts); end end @@ -824,8 +782,6 @@ class Dalli::NotPermittedMultiOpError < ::Dalli::DalliError; end # pkg:gem/dalli#lib/dalli/pid_cache.rb:7 module Dalli::PIDCache class << self - # Returns the value of attribute pid. - # # pkg:gem/dalli#lib/dalli/pid_cache.rb:13 def pid; end @@ -848,8 +804,6 @@ end # # pkg:gem/dalli#lib/dalli/pipelined_deleter.rb:9 class Dalli::PipelinedDeleter - # @return [PipelinedDeleter] a new instance of PipelinedDeleter - # # pkg:gem/dalli#lib/dalli/pipelined_deleter.rb:10 def initialize(ring, key_manager); end @@ -885,8 +839,6 @@ end # # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:9 class Dalli::PipelinedGetter - # @return [PipelinedGetter] a new instance of PipelinedGetter - # # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:17 def initialize(ring, key_manager); end @@ -968,8 +920,6 @@ Dalli::PipelinedGetter::INTERLEAVE_THRESHOLD = T.let(T.unsafe(nil), Integer) # # pkg:gem/dalli#lib/dalli/pipelined_setter.rb:9 class Dalli::PipelinedSetter - # @return [PipelinedSetter] a new instance of PipelinedSetter - # # pkg:gem/dalli#lib/dalli/pipelined_setter.rb:10 def initialize(ring, key_manager); end @@ -977,8 +927,8 @@ class Dalli::PipelinedSetter # Raises an error if any server is unavailable. # # @param hash [Hash] key-value pairs to set - # @param req_options [Hash] options passed to each set operation # @param ttl [Integer] time-to-live in seconds + # @param req_options [Hash] options passed to each set operation # @return [void] # # pkg:gem/dalli#lib/dalli/pipelined_setter.rb:24 @@ -1015,60 +965,48 @@ module Dalli::Protocol; end class Dalli::Protocol::Base extend ::Forwardable - # @return [Base] a new instance of Base - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:23 def initialize(attribs, client_options = T.unsafe(nil)); end # Boolean method used by clients of this class to determine if this # particular memcached instance is available for use. # - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:64 def alive?; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def close(*_arg0, **_arg1, &_arg2); end + def close(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:19 - def compress_by_default?(*_arg0, **_arg1, &_arg2); end + def compress_by_default?(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:19 - def compression_min_size(*_arg0, **_arg1, &_arg2); end + def compression_min_size(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:19 - def compressor(*_arg0, **_arg1, &_arg2); end + def compressor(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def connected?(*_arg0, **_arg1, &_arg2); end + def connected?(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def down!(*_arg0, **_arg1, &_arg2); end + def down!(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def hostname(*_arg0, **_arg1, &_arg2); end + def hostname(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:72 def lock!; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:170 def multi?; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def name(*_arg0, **_arg1, &_arg2); end + def name(*args, **_arg1, &block); end - # Returns the value of attribute options. - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:17 def options; end - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:17 def options=(_arg0); end @@ -1086,8 +1024,6 @@ class Dalli::Protocol::Base # Did the last call to #pipeline_response_setup complete successfully? # - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:151 def pipeline_complete?; end @@ -1113,77 +1049,63 @@ class Dalli::Protocol::Base def pipeline_response_setup; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def port(*_arg0, **_arg1, &_arg2); end + def port(*args, **_arg1, &block); end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:167 def quiet?; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def raise_down_error(*_arg0, **_arg1, &_arg2); end + def raise_down_error(*args, **_arg1, &block); end # Returns true if client is in raw mode (no serialization/compression). # In raw mode, we can skip requesting bitflags from the server. # - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:33 def raw_mode?; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def reconnect_down_server?(*_arg0, **_arg1, &_arg2); end + def reconnect_down_server?(*args, **_arg1, &block); end # Chokepoint method for error handling and ensuring liveness # # pkg:gem/dalli#lib/dalli/protocol/base.rb:38 def request(opkey, *args); end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:163 def require_auth?; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:19 - def serializer(*_arg0, **_arg1, &_arg2); end + def serializer(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def sock(*_arg0, **_arg1, &_arg2); end + def sock(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def socket_timeout(*_arg0, **_arg1, &_arg2); end + def socket_timeout(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def socket_type(*_arg0, **_arg1, &_arg2); end + def socket_type(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:74 def unlock!; end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def up!(*_arg0, **_arg1, &_arg2); end + def up!(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:155 def username; end - # Returns the value of attribute weight. - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:17 def weight; end - # Sets the attribute weight - # - # @param value the value to set the attribute weight to. - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:17 def weight=(_arg0); end # pkg:gem/dalli#lib/dalli/protocol/base.rb:20 - def write(*_arg0, **_arg1, &_arg2); end + def write(*args, **_arg1, &block); end private - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:222 def cache_nils?(opts); end @@ -1238,8 +1160,6 @@ class Dalli::Protocol::Base # pkg:gem/dalli#lib/dalli/protocol/base.rb:294 def response_buffer; end - # @raise [Dalli::NotPermittedMultiOpError] - # # pkg:gem/dalli#lib/dalli/protocol/base.rb:179 def verify_allowed_quiet!(opkey); end @@ -1427,59 +1347,36 @@ Dalli::Protocol::Binary::RequestFormatter::TTL_ONLY = T.let(T.unsafe(nil), Strin # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:9 class Dalli::Protocol::Binary::ResponseHeader - # @raise [ArgumentError] - # @return [ResponseHeader] a new instance of ResponseHeader - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:15 def initialize(buf); end - # Returns the value of attribute body_len. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def body_len; end - # Returns the value of attribute cas. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def cas; end - # Returns the value of attribute data_type. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def data_type; end - # Returns the value of attribute extra_len. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def extra_len; end - # Returns the value of attribute key_len. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def key_len; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:25 def not_found?; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:30 def not_stored?; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:21 def ok?; end - # Returns the value of attribute opaque. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def opaque; end - # Returns the value of attribute status. - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13 def status; end end @@ -1499,8 +1396,6 @@ Dalli::Protocol::Binary::ResponseHeader::SIZE = T.let(T.unsafe(nil), Integer) # # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:11 class Dalli::Protocol::Binary::ResponseProcessor - # @return [ResponseProcessor] a new instance of ResponseProcessor - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:34 def initialize(io_source, value_marshaller); end @@ -1545,8 +1440,6 @@ class Dalli::Protocol::Binary::ResponseProcessor # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:170 def no_body_response; end - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:63 def raise_on_not_ok!(resp_header); end @@ -1575,8 +1468,6 @@ class Dalli::Protocol::Binary::ResponseProcessor # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:49 def unpack_response_body(resp_header, body, parse_as_stored_value); end - # @raise [Dalli::NetworkError] - # # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:178 def validate_auth_format(extra_len, count); end @@ -1594,8 +1485,6 @@ Dalli::Protocol::Binary::ResponseProcessor::RESPONSE_CODES = T.let(T.unsafe(nil) # # pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:9 module Dalli::Protocol::Binary::SaslAuthentication - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:40 def authenticate_connection; end @@ -1617,8 +1506,6 @@ Dalli::Protocol::Binary::SaslAuthentication::PLAIN_AUTH = T.let(T.unsafe(nil), S # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:15 class Dalli::Protocol::ConnectionManager - # @return [ConnectionManager] a new instance of ConnectionManager - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:32 def initialize(hostname, port, socket_type, client_options); end @@ -1634,8 +1521,6 @@ class Dalli::Protocol::ConnectionManager # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:102 def confirm_ready!; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:126 def connected?; end @@ -1658,20 +1543,12 @@ class Dalli::Protocol::ConnectionManager # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:170 def flush; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:236 def fork_detected?; end - # Returns the value of attribute hostname. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def hostname; end - # Sets the attribute hostname - # - # @param value the value to set the attribute hostname to. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def hostname=(_arg0); end @@ -1693,32 +1570,18 @@ class Dalli::Protocol::ConnectionManager # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:44 def name; end - # Returns the value of attribute options. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def options; end - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def options=(_arg0); end - # Returns the value of attribute port. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def port; end - # Sets the attribute port - # - # @param value the value to set the attribute port to. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def port=(_arg0); end - # @raise [Dalli::NetworkError] - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:94 def raise_down_error; end @@ -1734,44 +1597,30 @@ class Dalli::Protocol::ConnectionManager # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:178 def read_nonblock; end - # @raise [Dalli::RetryableNetworkError] - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:199 def reconnect!(message); end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:64 def reconnect_down_server?; end # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:228 def reconnect_on_fork; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:130 def request_in_progress?; end # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:205 def reset_down_info; end - # Returns the value of attribute sock. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:30 def sock; end # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:98 def socket_timeout; end - # Returns the value of attribute socket_type. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def socket_type; end - # Sets the attribute socket_type - # - # @param value the value to set the attribute socket_type to. - # # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29 def socket_type=(_arg0); end @@ -1805,8 +1654,6 @@ class Dalli::Protocol::Meta < ::Dalli::Protocol::Base # pkg:gem/dalli#lib/dalli/protocol/meta.rb:164 def append(key, value); end - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/protocol/meta.rb:260 def authenticate_connection; end @@ -1831,10 +1678,10 @@ class Dalli::Protocol::Meta < ::Dalli::Protocol::Base # Delete with stale invalidation instead of actual deletion. # Used with thundering herd protection to mark items as stale rather than removing them. - # # @note Requires memcached 1.6+ (meta protocol feature) - # @param cas [Integer] optional CAS value for compare-and-swap + # # @param key [String] the key to invalidate + # @param cas [Integer] optional CAS value for compare-and-swap # @return [Boolean] true if successful # # pkg:gem/dalli#lib/dalli/protocol/meta.rb:119 @@ -1857,12 +1704,13 @@ class Dalli::Protocol::Meta < ::Dalli::Protocol::Base def incr(key, count, ttl, initial); end # Comprehensive meta get with support for all metadata flags. + # @note Requires memcached 1.6+ (meta protocol feature) + # # This is the full-featured get method that supports: # - Thundering herd protection (vivify_ttl, recache_ttl) # - Item metadata (hit_status, last_access) # - LRU control (skip_lru_bump) # - # @note Requires memcached 1.6+ (meta protocol feature) # @param key [String] the key to retrieve # @param options [Hash] options controlling what metadata to return # - :vivify_ttl [Integer] creates a stub on miss with this TTL (N flag) @@ -2019,8 +1867,6 @@ class Dalli::Protocol::Meta::RequestFormatter # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:144 def parse_to_64_bit_int(val, default); end - # @raise [ArgumentError] - # # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:116 def stats(arg = T.unsafe(nil)); end @@ -2038,8 +1884,6 @@ Dalli::Protocol::Meta::RequestFormatter::ALLOWED_STATS_ARGS = T.let(T.unsafe(nil # # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:11 class Dalli::Protocol::Meta::ResponseProcessor - # @return [ResponseProcessor] a new instance of ResponseProcessor - # # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:26 def initialize(io_source, value_marshaller); end @@ -2061,8 +1905,6 @@ class Dalli::Protocol::Meta::ResponseProcessor # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:108 def decr_incr; end - # @raise [Dalli::ServerError] - # # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:192 def error_on_unexpected!(expected_codes); end @@ -2210,8 +2052,6 @@ Dalli::Protocol::NOT_FOUND = T.let(T.unsafe(nil), Dalli::NilObject) # # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:13 class Dalli::Protocol::ResponseBuffer - # @return [ResponseBuffer] a new instance of ResponseBuffer - # # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:18 def initialize(io_source, response_processor); end @@ -2227,8 +2067,6 @@ class Dalli::Protocol::ResponseBuffer # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:48 def ensure_ready; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:61 def in_progress?; end @@ -2280,18 +2118,12 @@ class Dalli::Protocol::ServerConfigParser # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:67 def attributes_for_tcp_socket(res); end - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:60 def attributes_for_unix_socket(res); end - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:53 def deconstruct_string(str); end - # @raise [Dalli::DalliError] - # # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:71 def normalize_host_from_match(str, res); end @@ -2336,13 +2168,9 @@ Dalli::Protocol::ServerConfigParser::SERVER_CONFIG_REGEXP = T.let(T.unsafe(nil), # # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:11 class Dalli::Protocol::StringMarshaller - # @return [StringMarshaller] a new instance of StringMarshaller - # # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:19 def initialize(client_options); end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:51 def compress_by_default?; end @@ -2361,20 +2189,14 @@ class Dalli::Protocol::StringMarshaller # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:39 def serializer; end - # @raise [MarshalError] - # # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:25 def store(key, value, _options = T.unsafe(nil)); end - # Returns the value of attribute value_max_bytes. - # # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:17 def value_max_bytes; end private - # @raise [Dalli::ValueOverMaxSize] - # # pkg:gem/dalli#lib/dalli/protocol/string_marshaller.rb:57 def error_if_over_max_value_bytes(key, value); end end @@ -2404,8 +2226,6 @@ class Dalli::Protocol::TtlSanitizer # pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:40 def current_timestamp; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:25 def less_than_max_expiration_interval?(ttl_as_i); end @@ -2430,13 +2250,9 @@ Dalli::Protocol::TtlSanitizer::MAX_ACCEPTABLE_EXPIRATION_INTERVAL = T.let(T.unsa # # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:13 class Dalli::Protocol::ValueCompressor - # @return [ValueCompressor] a new instance of ValueCompressor - # # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:27 def initialize(client_options); end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:51 def compress_by_default?; end @@ -2446,8 +2262,6 @@ class Dalli::Protocol::ValueCompressor # based on a method-level option if specified, falling back to the # server default. # - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:68 def compress_value?(value, req_options); end @@ -2484,22 +2298,18 @@ Dalli::Protocol::ValueCompressor::OPTIONS = T.let(T.unsafe(nil), Array) class Dalli::Protocol::ValueMarshaller extend ::Forwardable - # @return [ValueMarshaller] a new instance of ValueMarshaller - # # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:25 def initialize(client_options); end # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:23 - def compress_by_default?(*_arg0, **_arg1, &_arg2); end + def compress_by_default?(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:23 - def compression_min_size(*_arg0, **_arg1, &_arg2); end + def compression_min_size(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:23 - def compressor(*_arg0, **_arg1, &_arg2); end + def compressor(*args, **_arg1, &block); end - # @raise [Dalli::ValueOverMaxSize] - # # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:51 def error_if_over_max_value_bytes(key, value); end @@ -2507,7 +2317,7 @@ class Dalli::Protocol::ValueMarshaller def retrieve(value, flags); end # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:22 - def serializer(*_arg0, **_arg1, &_arg2); end + def serializer(*args, **_arg1, &block); end # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:33 def store(key, value, options = T.unsafe(nil)); end @@ -2529,8 +2339,6 @@ Dalli::Protocol::ValueMarshaller::OPTIONS = T.let(T.unsafe(nil), Array) # # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:11 class Dalli::Protocol::ValueSerializer - # @return [ValueSerializer] a new instance of ValueSerializer - # # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:28 def initialize(protocol_options); end @@ -2565,8 +2373,6 @@ class Dalli::Protocol::ValueSerializer # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:86 def store_string_fastpath(value, bitflags); end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:94 def use_string_fastpath?(value, req_options); end @@ -2633,8 +2439,6 @@ class Dalli::RetryableNetworkError < ::Dalli::NetworkError; end # # pkg:gem/dalli#lib/dalli/ring.rb:19 class Dalli::Ring - # @return [Ring] a new instance of Ring - # # pkg:gem/dalli#lib/dalli/ring.rb:26 def initialize(servers_arg, protocol_implementation, options); end @@ -2660,8 +2464,6 @@ class Dalli::Ring # pkg:gem/dalli#lib/dalli/ring.rb:84 def pipeline_consume_and_ignore_responses; end - # @raise [Dalli::RingError] - # # pkg:gem/dalli#lib/dalli/ring.rb:37 def server_for_key(key); end @@ -2703,18 +2505,12 @@ end # # pkg:gem/dalli#lib/dalli/ring.rb:144 class Dalli::Ring::Entry - # @return [Entry] a new instance of Entry - # # pkg:gem/dalli#lib/dalli/ring.rb:147 def initialize(val, srv); end - # Returns the value of attribute server. - # # pkg:gem/dalli#lib/dalli/ring.rb:145 def server; end - # Returns the value of attribute value. - # # pkg:gem/dalli#lib/dalli/ring.rb:145 def value; end end @@ -2769,8 +2565,6 @@ module Dalli::ServersArgNormalizer # pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:34 def normalize_servers(arg); end - # @raise [ArgumentError] - # # pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:46 def validate_type(arg); end end @@ -2791,17 +2585,12 @@ module Dalli::Socket; end # # pkg:gem/dalli#lib/dalli/socket.rb:14 module Dalli::Socket::InstanceMethods - # @raise [Timeout::Error] - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/socket.rb:39 def append_to_buffer?(result); end # pkg:gem/dalli#lib/dalli/socket.rb:54 def logged_options; end - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/socket.rb:46 def nonblock_timed_out?(result); end @@ -2828,6 +2617,12 @@ class Dalli::Socket::SSLSocket < ::OpenSSL::SSL::SSLSocket # pkg:gem/dalli#lib/dalli/socket.rb:67 def options; end + + # pkg:gem/dalli#lib/dalli/socket.rb:72 + def wait_readable(timeout = T.unsafe(nil)); end + + # pkg:gem/dalli#lib/dalli/socket.rb:78 + def wait_writable(timeout = T.unsafe(nil)); end end # A standard TCP socket between the Dalli client and the Memcached server. @@ -2872,8 +2667,6 @@ class Dalli::Socket::TCP < ::TCPSocket # Returns false if TCPSocket#initialize has been monkey-patched by gems like # socksify or resolv-replace, which don't support keyword arguments. # - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/socket.rb:111 def supports_connect_timeout?; end @@ -2906,6 +2699,9 @@ Dalli::Socket::TCP::TIMEVAL_PACK_FORMATS = T.let(T.unsafe(nil), Array) # pkg:gem/dalli#lib/dalli/socket.rb:169 Dalli::Socket::TCP::TIMEVAL_TEST_VALUES = T.let(T.unsafe(nil), Array) +# UNIX domain sockets are not supported on Windows platforms. +# +# # UNIX represents a UNIX domain socket, which is an interprocess communication # mechanism between processes on the same host. Used when the Memcached server # is running on the same machine as the Dalli client. @@ -2942,8 +2738,6 @@ end # # pkg:gem/dalli#lib/dalli/options.rb:11 module Dalli::Threadsafe - # @return [Boolean] - # # pkg:gem/dalli#lib/dalli/options.rb:22 def alive?; end @@ -2972,8 +2766,6 @@ module Dalli::Threadsafe def unlock!; end class << self - # @private - # # pkg:gem/dalli#lib/dalli/options.rb:12 def extended(obj); end end @@ -3053,16 +2845,12 @@ class Rack::Session::Dalli < ::Rack::Session::Abstract::PersistedSecure # for more information about it and its default options (which would only # be applicable if you supplied one of the two options, but not both). # - # @return [Dalli] a new instance of Dalli - # # pkg:gem/dalli#lib/rack/session/dalli.rb:68 def initialize(app, options = T.unsafe(nil)); end # pkg:gem/dalli#lib/rack/session/dalli.rb:77 def call(*_args); end - # Returns the value of attribute data. - # # pkg:gem/dalli#lib/rack/session/dalli.rb:16 def data; end diff --git a/sorbet/rbi/gems/date@3.5.1.rbi b/sorbet/rbi/gems/date@3.5.1.rbi index 6c82a439a..ee4d0a3b4 100644 --- a/sorbet/rbi/gems/date@3.5.1.rbi +++ b/sorbet/rbi/gems/date@3.5.1.rbi @@ -1,357 +1,25 @@ -# typed: false +# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `date` gem. # Please instead update this file by running `bin/tapioca gem date`. -# pkg:gem/date#lib/date.rb:4 +# pkg:gem/date#lib/date.rb:6 class Date include ::Comparable - # pkg:gem/date#lib/date.rb:4 - def initialize(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def +(other); end - - # pkg:gem/date#lib/date.rb:4 - def -(other); end - - # pkg:gem/date#lib/date.rb:4 - def <<(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def <=>(other); end - - # pkg:gem/date#lib/date.rb:4 - def ===(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def >>(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def ajd; end - - # pkg:gem/date#lib/date.rb:4 - def amjd; end - - # pkg:gem/date#lib/date.rb:4 - def asctime; end - - # pkg:gem/date#lib/date.rb:4 - def ctime; end - - # pkg:gem/date#lib/date.rb:4 - def cwday; end - - # pkg:gem/date#lib/date.rb:4 - def cweek; end - - # pkg:gem/date#lib/date.rb:4 - def cwyear; end - - # pkg:gem/date#lib/date.rb:4 - def day; end - - # pkg:gem/date#lib/date.rb:4 - def day_fraction; end - - # pkg:gem/date#lib/date.rb:4 - def deconstruct_keys(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def downto(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def england; end - - # pkg:gem/date#lib/date.rb:4 - def eql?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def friday?; end - - # pkg:gem/date#lib/date.rb:4 - def gregorian; end - - # pkg:gem/date#lib/date.rb:4 - def gregorian?; end - - # pkg:gem/date#lib/date.rb:4 - def hash; end - - # pkg:gem/date#lib/date.rb:4 - def httpdate; end - # call-seq: # infinite? -> false # # Returns +false+ # - # @return [Boolean] - # # pkg:gem/date#lib/date.rb:13 def infinite?; end - - # pkg:gem/date#lib/date.rb:4 - def inspect; end - - # pkg:gem/date#lib/date.rb:4 - def iso8601; end - - # pkg:gem/date#lib/date.rb:4 - def italy; end - - # pkg:gem/date#lib/date.rb:4 - def jd; end - - # pkg:gem/date#lib/date.rb:4 - def jisx0301; end - - # pkg:gem/date#lib/date.rb:4 - def julian; end - - # pkg:gem/date#lib/date.rb:4 - def julian?; end - - # pkg:gem/date#lib/date.rb:4 - def ld; end - - # pkg:gem/date#lib/date.rb:4 - def leap?; end - - # pkg:gem/date#lib/date.rb:4 - def marshal_dump; end - - # pkg:gem/date#lib/date.rb:4 - def marshal_load(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def mday; end - - # pkg:gem/date#lib/date.rb:4 - def mjd; end - - # pkg:gem/date#lib/date.rb:4 - def mon; end - - # pkg:gem/date#lib/date.rb:4 - def monday?; end - - # pkg:gem/date#lib/date.rb:4 - def month; end - - # pkg:gem/date#lib/date.rb:4 - def new_start(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def next; end - - # pkg:gem/date#lib/date.rb:4 - def next_day(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def next_month(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def next_year(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def prev_day(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def prev_month(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def prev_year(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc2822; end - - # pkg:gem/date#lib/date.rb:4 - def rfc3339; end - - # pkg:gem/date#lib/date.rb:4 - def rfc822; end - - # pkg:gem/date#lib/date.rb:4 - def saturday?; end - - # pkg:gem/date#lib/date.rb:4 - def start; end - - # pkg:gem/date#lib/date.rb:4 - def step(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def strftime(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def succ; end - - # pkg:gem/date#lib/date.rb:4 - def sunday?; end - - # pkg:gem/date#lib/date.rb:4 - def thursday?; end - - # pkg:gem/date#lib/date.rb:4 - def to_date; end - - # pkg:gem/date#lib/date.rb:4 - def to_datetime; end - - # pkg:gem/date#lib/date.rb:4 - def to_s; end - - # pkg:gem/date#lib/date.rb:4 - def to_time(form = T.unsafe(nil)); end - - # pkg:gem/date#lib/date.rb:4 - def tuesday?; end - - # pkg:gem/date#lib/date.rb:4 - def upto(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def wday; end - - # pkg:gem/date#lib/date.rb:4 - def wednesday?; end - - # pkg:gem/date#lib/date.rb:4 - def xmlschema; end - - # pkg:gem/date#lib/date.rb:4 - def yday; end - - # pkg:gem/date#lib/date.rb:4 - def year; end - - private - - # pkg:gem/date#lib/date.rb:4 - def hour; end - - # pkg:gem/date#lib/date.rb:4 - def initialize_copy(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def min; end - - # pkg:gem/date#lib/date.rb:4 - def minute; end - - # pkg:gem/date#lib/date.rb:4 - def sec; end - - # pkg:gem/date#lib/date.rb:4 - def second; end - - class << self - # pkg:gem/date#lib/date.rb:4 - def _httpdate(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _iso8601(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _jisx0301(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _load(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _parse(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _rfc2822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _rfc3339(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _rfc822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _strptime(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _xmlschema(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def civil(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def commercial(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def gregorian_leap?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def httpdate(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def iso8601(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def jd(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def jisx0301(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def julian_leap?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def leap?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def ordinal(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def parse(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc2822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc3339(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def strptime(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def today(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_civil?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_commercial?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_date?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_jd?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_ordinal?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def xmlschema(*_arg0); end - end end # pkg:gem/date#lib/date.rb:17 class Date::Infinity < ::Numeric - # @return [Infinity] a new instance of Infinity - # # pkg:gem/date#lib/date.rb:19 def initialize(d = T.unsafe(nil)); end @@ -370,26 +38,18 @@ class Date::Infinity < ::Numeric # pkg:gem/date#lib/date.rb:51 def coerce(other); end - # @return [Boolean] - # # pkg:gem/date#lib/date.rb:26 def finite?; end - # @return [Boolean] - # # pkg:gem/date#lib/date.rb:27 def infinite?; end - # @return [Boolean] - # # pkg:gem/date#lib/date.rb:28 def nan?; end # pkg:gem/date#lib/date.rb:59 def to_f; end - # @return [Boolean] - # # pkg:gem/date#lib/date.rb:25 def zero?; end diff --git a/sorbet/rbi/gems/deep_merge@1.2.2.rbi b/sorbet/rbi/gems/deep_merge@1.2.2.rbi index c0fa8a310..72baa9c70 100644 --- a/sorbet/rbi/gems/deep_merge@1.2.2.rbi +++ b/sorbet/rbi/gems/deep_merge@1.2.2.rbi @@ -83,8 +83,6 @@ module DeepMerge # There are many tests for this library - and you can learn more about the features # and usages of deep_merge! by just browsing the test examples # - # @raise [InvalidParameter] - # # pkg:gem/deep_merge#lib/deep_merge/core.rb:78 def deep_merge!(source, dest, options = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/drb@2.2.3.rbi b/sorbet/rbi/gems/drb@2.2.3.rbi index 7f2a1c7be..a8dd54b4d 100644 --- a/sorbet/rbi/gems/drb@2.2.3.rbi +++ b/sorbet/rbi/gems/drb@2.2.3.rbi @@ -314,8 +314,6 @@ module DRb # If the above rule fails to find a server, a DRbServerNotFound # error is raised. # - # @raise [DRbServerNotFound] - # # pkg:gem/drb#lib/drb/drb.rb:1839 def current_server; end @@ -336,8 +334,6 @@ module DRb # Is +uri+ the URI for the current local server? # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1872 def here?(uri); end @@ -473,8 +469,6 @@ module DRb # If the above rule fails to find a server, a DRbServerNotFound # error is raised. # - # @raise [DRbServerNotFound] - # # pkg:gem/drb#lib/drb/drb.rb:1845 def current_server; end @@ -495,8 +489,6 @@ module DRb # Is +uri+ the URI for the current local server? # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1876 def here?(uri); end @@ -527,10 +519,6 @@ module DRb # pkg:gem/drb#lib/drb/drb.rb:1827 def primary_server; end - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # # pkg:gem/drb#lib/drb/drb.rb:1827 def primary_server=(_arg0); end @@ -614,7 +602,6 @@ module DRb end end -# # This is an internal singleton instance. This must not be used # by users. # @@ -631,8 +618,6 @@ class DRb::DRbArray # Creates a new DRbArray that either dumps or wraps all the items in the # Array +ary+ so they can be loaded by a remote DRb server. # - # @return [DRbArray] a new instance of DRbArray - # # pkg:gem/drb#lib/drb/drb.rb:551 def initialize(ary); end @@ -657,13 +642,9 @@ end # # pkg:gem/drb#lib/drb/drb.rb:1284 class DRb::DRbConn - # @return [DRbConn] a new instance of DRbConn - # # pkg:gem/drb#lib/drb/drb.rb:1345 def initialize(remote_uri); end - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1361 def alive?; end @@ -729,24 +710,18 @@ end # # pkg:gem/drb#lib/drb/drb.rb:584 class DRb::DRbMessage - # @return [DRbMessage] a new instance of DRbMessage - # # pkg:gem/drb#lib/drb/drb.rb:585 def initialize(config); end # pkg:gem/drb#lib/drb/drb.rb:590 def dump(obj, error = T.unsafe(nil)); end - # @raise [DRbConnError] - # # pkg:gem/drb#lib/drb/drb.rb:607 def load(soc); end # pkg:gem/drb#lib/drb/drb.rb:667 def recv_reply(stream); end - # @raise [DRbConnError] - # # pkg:gem/drb#lib/drb/drb.rb:647 def recv_request(stream); end @@ -762,6 +737,11 @@ class DRb::DRbMessage def make_proxy(obj, error = T.unsafe(nil)); end end +# Object wrapping a reference to a remote drb object. +# +# Method calls on this object are relayed to the remote +# object that this object is a stub for. +# # pkg:gem/drb#lib/drb/eq.rb:3 class DRb::DRbObject # Create a new remote object stub. @@ -770,8 +750,6 @@ class DRb::DRbObject # this is +nil+. +uri+ is the URI of the remote object that this # will be a stub for. # - # @return [DRbObject] a new instance of DRbObject - # # pkg:gem/drb#lib/drb/drb.rb:1117 def initialize(obj, uri = T.unsafe(nil)); end @@ -812,8 +790,6 @@ class DRb::DRbObject # Routes respond_to? to the referenced remote object. # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1151 def respond_to?(msg_id, priv = T.unsafe(nil)); end @@ -855,8 +831,6 @@ end class DRb::DRbObjectSpace include ::MonitorMixin - # @return [DRbObjectSpace] a new instance of DRbObjectSpace - # # pkg:gem/drb#lib/drb/drb.rb:357 def initialize; end @@ -954,8 +928,6 @@ module DRb::DRbProtocol # URI, then a DRbBadURI error is raised. If a protocol accepts the # URI, but an error occurs in opening it, a DRbConnError is raised. # - # @raise [DRbBadURI] - # # pkg:gem/drb#lib/drb/drb.rb:764 def open(uri, config, first = T.unsafe(nil)); end @@ -969,8 +941,6 @@ module DRb::DRbProtocol # accepts the URI, but an error occurs in opening it, the underlying # error is passed on to the caller. # - # @raise [DRbBadURI] - # # pkg:gem/drb#lib/drb/drb.rb:792 def open_server(uri, config, first = T.unsafe(nil)); end @@ -981,8 +951,6 @@ module DRb::DRbProtocol # URI by raising a DRbBadScheme error. If no protocol recognises the # URI, then a DRbBadURI error is raised. # - # @raise [DRbBadURI] - # # pkg:gem/drb#lib/drb/drb.rb:813 def uri_option(uri, config, first = T.unsafe(nil)); end @@ -1003,8 +971,6 @@ module DRb::DRbProtocol # URI, then a DRbBadURI error is raised. If a protocol accepts the # URI, but an error occurs in opening it, a DRbConnError is raised. # - # @raise [DRbBadURI] - # # pkg:gem/drb#lib/drb/drb.rb:781 def open(uri, config, first = T.unsafe(nil)); end @@ -1018,8 +984,6 @@ module DRb::DRbProtocol # accepts the URI, but an error occurs in opening it, the underlying # error is passed on to the caller. # - # @raise [DRbBadURI] - # # pkg:gem/drb#lib/drb/drb.rb:805 def open_server(uri, config, first = T.unsafe(nil)); end @@ -1030,8 +994,6 @@ module DRb::DRbProtocol # URI by raising a DRbBadScheme error. If no protocol recognises the # URI, then a DRbBadURI error is raised. # - # @raise [DRbBadURI] - # # pkg:gem/drb#lib/drb/drb.rb:828 def uri_option(uri, config, first = T.unsafe(nil)); end end @@ -1043,8 +1005,6 @@ end class DRb::DRbRemoteError < ::DRb::DRbError # Creates a new remote error that wraps the Exception +error+ # - # @return [DRbRemoteError] a new instance of DRbRemoteError - # # pkg:gem/drb#lib/drb/drb.rb:462 def initialize(error); end @@ -1111,15 +1071,11 @@ class DRb::DRbServer # # The server will immediately start running in its own thread. # - # @return [DRbServer] a new instance of DRbServer - # # pkg:gem/drb#lib/drb/drb.rb:1479 def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end # Is this server alive? # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1534 def alive?; end @@ -1132,8 +1088,6 @@ class DRb::DRbServer # SecurityError is thrown. If the method is private or undefined, # a NameError is thrown. # - # @raise [ArgumentError] - # # pkg:gem/drb#lib/drb/drb.rb:1622 def check_insecure_method(obj, msg_id); end @@ -1152,8 +1106,6 @@ class DRb::DRbServer # Is +uri+ the URI for this server? # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1539 def here?(uri); end @@ -1213,8 +1165,6 @@ class DRb::DRbServer # Has a method been included in the list of insecure methods? # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1602 def insecure_method?(msg_id); end @@ -1285,8 +1235,6 @@ end # pkg:gem/drb#lib/drb/drb.rb:1652 class DRb::DRbServer::InvokeMethod - # @return [InvokeMethod] a new instance of InvokeMethod - # # pkg:gem/drb#lib/drb/drb.rb:1653 def initialize(drb_server, client); end @@ -1327,8 +1275,6 @@ class DRb::DRbTCPSocket # +soc+ is the tcp socket we are bound to. +config+ is our # configuration. # - # @return [DRbTCPSocket] a new instance of DRbTCPSocket - # # pkg:gem/drb#lib/drb/drb.rb:931 def initialize(uri, soc, config = T.unsafe(nil)); end @@ -1341,8 +1287,6 @@ class DRb::DRbTCPSocket # Check to see if this connection is alive. # - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1029 def alive?; end @@ -1454,8 +1398,6 @@ end # # pkg:gem/drb#lib/drb/unix.rb:15 class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket - # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket - # # pkg:gem/drb#lib/drb/unix.rb:62 def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end @@ -1495,8 +1437,6 @@ DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer) # pkg:gem/drb#lib/drb/drb.rb:1049 class DRb::DRbURIOption - # @return [DRbURIOption] a new instance of DRbURIOption - # # pkg:gem/drb#lib/drb/drb.rb:1050 def initialize(option); end @@ -1509,8 +1449,6 @@ class DRb::DRbURIOption # pkg:gem/drb#lib/drb/drb.rb:1061 def hash; end - # Returns the value of attribute option. - # # pkg:gem/drb#lib/drb/drb.rb:1053 def option; end @@ -1527,8 +1465,6 @@ end # # pkg:gem/drb#lib/drb/drb.rb:418 module DRb::DRbUndumped - # @raise [TypeError] - # # pkg:gem/drb#lib/drb/drb.rb:419 def _dump(dummy); end end @@ -1556,8 +1492,6 @@ class DRb::DRbUnknown # when the unmarshalling failed. It is used to determine the # name of the unmarshalled object. # - # @return [DRbUnknown] a new instance of DRbUnknown - # # pkg:gem/drb#lib/drb/drb.rb:493 def initialize(err, buf); end @@ -1603,8 +1537,6 @@ end class DRb::DRbUnknownError < ::DRb::DRbError # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ # - # @return [DRbUnknownError] a new instance of DRbUnknownError - # # pkg:gem/drb#lib/drb/drb.rb:441 def initialize(unknown); end @@ -1626,16 +1558,12 @@ end class DRb::ThreadObject include ::MonitorMixin - # @return [ThreadObject] a new instance of ThreadObject - # # pkg:gem/drb#lib/drb/drb.rb:1230 def initialize(&blk); end # pkg:gem/drb#lib/drb/drb.rb:1265 def _execute; end - # @return [Boolean] - # # pkg:gem/drb#lib/drb/drb.rb:1241 def alive?; end diff --git a/sorbet/rbi/gems/erb@6.0.1.rbi b/sorbet/rbi/gems/erb@6.0.1.rbi index 791375fae..4b8669cc5 100644 --- a/sorbet/rbi/gems/erb@6.0.1.rbi +++ b/sorbet/rbi/gems/erb@6.0.1.rbi @@ -5,6 +5,748 @@ # Please instead update this file by running `bin/tapioca gem erb`. +# :markup: markdown +# +# Class **ERB** (the name stands for **Embedded Ruby**) +# is an easy-to-use, but also very powerful, [template processor][template processor]. +# +# ## Usage +# +# Before you can use \ERB, you must first require it +# (examples on this page assume that this has been done): +# +# ``` +# require 'erb' +# ``` +# +# ## In Brief +# +# Here's how \ERB works: +# +# - You can create a *template*: a plain-text string that includes specially formatted *tags*.. +# - You can create an \ERB object to store the template. +# - You can call instance method ERB#result to get the *result*. +# +# \ERB supports tags of three kinds: +# +# - [Expression tags][expression tags]: +# each begins with `'<%='`, ends with `'%>'`; contains a Ruby expression; +# in the result, the value of the expression replaces the entire tag: +# +# template = 'The magic word is <%= magic_word %>.' +# erb = ERB.new(template) +# magic_word = 'xyzzy' +# erb.result(binding) # => "The magic word is xyzzy." +# +# The above call to #result passes argument `binding`, +# which contains the binding of variable `magic_word` to its string value `'xyzzy'`. +# +# The below call to #result need not pass a binding, +# because its expression `Date::DAYNAMES` is globally defined. +# +# ERB.new('Today is <%= Date::DAYNAMES[Date.today.wday] %>.').result # => "Today is Monday." +# +# - [Execution tags][execution tags]: +# each begins with `'<%'`, ends with `'%>'`; contains Ruby code to be executed: +# +# template = '<% File.write("t.txt", "Some stuff.") %>' +# ERB.new(template).result +# File.read('t.txt') # => "Some stuff." +# +# - [Comment tags][comment tags]: +# each begins with `'<%#'`, ends with `'%>'`; contains comment text; +# in the result, the entire tag is omitted. +# +# template = 'Some stuff;<%# Note to self: figure out what the stuff is. %> more stuff.' +# ERB.new(template).result # => "Some stuff; more stuff." +# +# ## Some Simple Examples +# +# Here's a simple example of \ERB in action: +# +# ``` +# template = 'The time is <%= Time.now %>.' +# erb = ERB.new(template) +# erb.result +# # => "The time is 2025-09-09 10:49:26 -0500." +# ``` +# +# Details: +# +# 1. A plain-text string is assigned to variable `template`. +# Its embedded [expression tag][expression tags] `'<%= Time.now %>'` includes a Ruby expression, `Time.now`. +# 2. The string is put into a new \ERB object, and stored in variable `erb`. +# 4. Method call `erb.result` generates a string that contains the run-time value of `Time.now`, +# as computed at the time of the call. +# +# The +# \ERB object may be re-used: +# +# ``` +# erb.result +# # => "The time is 2025-09-09 10:49:33 -0500." +# ``` +# +# Another example: +# +# ``` +# template = 'The magic word is <%= magic_word %>.' +# erb = ERB.new(template) +# magic_word = 'abracadabra' +# erb.result(binding) +# # => "The magic word is abracadabra." +# ``` +# +# Details: +# +# 1. As before, a plain-text string is assigned to variable `template`. +# Its embedded [expression tag][expression tags] `'<%= magic_word %>'` has a variable *name*, `magic_word`. +# 2. The string is put into a new \ERB object, and stored in variable `erb`; +# note that `magic_word` need not be defined before the \ERB object is created. +# 3. `magic_word = 'abracadabra'` assigns a value to variable `magic_word`. +# 4. Method call `erb.result(binding)` generates a string +# that contains the *value* of `magic_word`. +# +# As before, the \ERB object may be re-used: +# +# ``` +# magic_word = 'xyzzy' +# erb.result(binding) +# # => "The magic word is xyzzy." +# ``` +# +# ## Bindings +# +# A call to method #result, which produces the formatted result string, +# requires a [Binding object][binding object] as its argument. +# +# The binding object provides the bindings for expressions in [expression tags][expression tags]. +# +# There are three ways to provide the required binding: +# +# - [Default binding][default binding]. +# - [Local binding][local binding]. +# - [Augmented binding][augmented binding] +# +# ### Default Binding +# +# When you pass no `binding` argument to method #result, +# the method uses its default binding: the one returned by method #new_toplevel. +# This binding has the bindings defined by Ruby itself, +# which are those for Ruby's constants and variables. +# +# That binding is sufficient for an expression tag that refers only to Ruby's constants and variables; +# these expression tags refer only to Ruby's global constant `RUBY_COPYRIGHT` and global variable `$0`: +# +# ``` +# template = <