diff --git a/actioncable/lib/action_cable/subscription_adapter/async.rb b/actioncable/lib/action_cable/subscription_adapter/async.rb index c9930299c7e31..2310ce2b2ab42 100644 --- a/actioncable/lib/action_cable/subscription_adapter/async.rb +++ b/actioncable/lib/action_cable/subscription_adapter/async.rb @@ -10,7 +10,7 @@ def new_subscriber_map AsyncSubscriberMap.new(server.event_loop) end - class AsyncSubscriberMap < SubscriberMap + class AsyncSubscriberMap < SubscriberMap # :nodoc: def initialize(event_loop) @event_loop = event_loop super() diff --git a/actioncable/lib/action_cable/subscription_adapter/postgresql.rb b/actioncable/lib/action_cable/subscription_adapter/postgresql.rb index 563a2aa3c946c..781f1956b3f19 100644 --- a/actioncable/lib/action_cable/subscription_adapter/postgresql.rb +++ b/actioncable/lib/action_cable/subscription_adapter/postgresql.rb @@ -71,7 +71,7 @@ def verify!(pg_conn) end end - class Listener < SubscriberMap + class Listener < SubscriberMap # :nodoc: def initialize(adapter, event_loop) super() diff --git a/actioncable/lib/action_cable/subscription_adapter/redis.rb b/actioncable/lib/action_cable/subscription_adapter/redis.rb index 9093395ae966b..ccf4fc6bda7ae 100644 --- a/actioncable/lib/action_cable/subscription_adapter/redis.rb +++ b/actioncable/lib/action_cable/subscription_adapter/redis.rb @@ -59,7 +59,7 @@ def redis_connection self.class.redis_connector.call(@server.config.cable.merge(id: identifier)) end - class Listener < SubscriberMap + class Listener < SubscriberMap # :nodoc: def initialize(adapter, event_loop) super() diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 5b9dd0128a6be..29da465fe96b8 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -230,7 +230,7 @@ def build_queue(queue_size) end end - class Response < ActionDispatch::Response # :nodoc: all + class Response < ActionDispatch::Response # :nodoc: private def before_committed super diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 195b1d4c6fba9..9b10347ce3865 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -472,7 +472,7 @@ def assign_default_content_type_and_charset! ct.charset || self.class.default_charset) end - class RackBody + class RackBody # :nodoc: def initialize(response) @response = response end diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index d1f7c0afd7070..9027cc895c605 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -133,8 +133,8 @@ def collect_engine_routes(route) end end - module ConsoleFormatter - class Base + module ConsoleFormatter # :nodoc: + class Base # :nodoc: def initialize @buffer = [] end @@ -170,7 +170,7 @@ def no_routes(routes, filter) end end - class Sheet < Base + class Sheet < Base # :nodoc: def section_title(title) @buffer << "\n#{title}:" end @@ -206,7 +206,7 @@ def widths(routes) end end - class Expanded < Base + class Expanded < Base # :nodoc: def initialize(width: IO.console_size[1]) @width = width super() @@ -239,7 +239,7 @@ def route_header(index:) end end - class HtmlTableFormatter + class HtmlTableFormatter # :nodoc: def initialize(view) @view = view @buffer = [] diff --git a/actionpack/lib/action_dispatch/testing/request_encoder.rb b/actionpack/lib/action_dispatch/testing/request_encoder.rb index 6c65bec62f140..368bec0be3065 100644 --- a/actionpack/lib/action_dispatch/testing/request_encoder.rb +++ b/actionpack/lib/action_dispatch/testing/request_encoder.rb @@ -2,7 +2,7 @@ module ActionDispatch class RequestEncoder # :nodoc: - class IdentityEncoder + class IdentityEncoder # :nodoc: def content_type; end def accept_header; end def encode_params(params); params; end diff --git a/actionview/lib/action_view/renderer/abstract_renderer.rb b/actionview/lib/action_view/renderer/abstract_renderer.rb index efecade8317df..c993acd011700 100644 --- a/actionview/lib/action_view/renderer/abstract_renderer.rb +++ b/actionview/lib/action_view/renderer/abstract_renderer.rb @@ -127,7 +127,7 @@ def format rendered_templates.first.format end - class EmptyCollection + class EmptyCollection # :nodoc: attr_reader :format def initialize(format) diff --git a/actionview/lib/action_view/template/handlers/erb/erubi.rb b/actionview/lib/action_view/template/handlers/erb/erubi.rb index 2e5dfc7a1ef1f..31df408c8d8c2 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubi.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubi.rb @@ -6,8 +6,7 @@ module ActionView class Template module Handlers class ERB - class Erubi < ::Erubi::Engine - # :nodoc: all + class Erubi < ::Erubi::Engine # :nodoc: def initialize(input, properties = {}) @newline_pending = 0 diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 7c004775e7f2f..6fc7f020e89e8 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -4,8 +4,8 @@ module ActionView class Template # :nodoc: - module Types - class Type + module Types # :nodoc: + class Type # :nodoc: SET = Struct.new(:symbols).new([ :html, :text, :js, :css, :xml, :json ]) def self.[](type) diff --git a/actionview/lib/action_view/template_details.rb b/actionview/lib/action_view/template_details.rb index 0f74fb65b2a48..61361b3f77cc8 100644 --- a/actionview/lib/action_view/template_details.rb +++ b/actionview/lib/action_view/template_details.rb @@ -2,7 +2,7 @@ module ActionView class TemplateDetails # :nodoc: - class Requested + class Requested # :nodoc: attr_reader :locale, :handlers, :formats, :variants attr_reader :locale_idx, :handlers_idx, :formats_idx, :variants_idx diff --git a/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb b/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb index 1011c5891a31d..f2fed0d764f69 100644 --- a/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb +++ b/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb @@ -2,9 +2,9 @@ module ActiveModel module Type - module Helpers # :nodoc: all - class AcceptsMultiparameterTime < Module - module InstanceMethods + module Helpers # :nodoc: + class AcceptsMultiparameterTime < Module # :nodoc: + module InstanceMethods # :nodoc: def serialize(value) super(cast(value)) end diff --git a/activemodel/lib/active_model/type/helpers/mutable.rb b/activemodel/lib/active_model/type/helpers/mutable.rb index 1cbea644c4a03..443d3ff325a03 100644 --- a/activemodel/lib/active_model/type/helpers/mutable.rb +++ b/activemodel/lib/active_model/type/helpers/mutable.rb @@ -2,8 +2,8 @@ module ActiveModel module Type - module Helpers # :nodoc: all - module Mutable + module Helpers # :nodoc: + module Mutable # :nodoc: def cast(value) deserialize(serialize(value)) end diff --git a/activemodel/lib/active_model/type/helpers/numeric.rb b/activemodel/lib/active_model/type/helpers/numeric.rb index 7a5c0e681e6a8..96f1f36995490 100644 --- a/activemodel/lib/active_model/type/helpers/numeric.rb +++ b/activemodel/lib/active_model/type/helpers/numeric.rb @@ -2,8 +2,8 @@ module ActiveModel module Type - module Helpers # :nodoc: all - module Numeric + module Helpers # :nodoc: + module Numeric # :nodoc: def serialize(value) cast(value) end diff --git a/activemodel/lib/active_model/type/helpers/time_value.rb b/activemodel/lib/active_model/type/helpers/time_value.rb index 5a70fe3bf9c72..142bef36f457a 100644 --- a/activemodel/lib/active_model/type/helpers/time_value.rb +++ b/activemodel/lib/active_model/type/helpers/time_value.rb @@ -5,8 +5,8 @@ module ActiveModel module Type - module Helpers # :nodoc: all - module TimeValue + module Helpers # :nodoc: + module TimeValue # :nodoc: def serialize(value) value = apply_seconds_precision(value) diff --git a/activemodel/lib/active_model/type/helpers/timezone.rb b/activemodel/lib/active_model/type/helpers/timezone.rb index b0477aec327e7..aa7dbc43f1344 100644 --- a/activemodel/lib/active_model/type/helpers/timezone.rb +++ b/activemodel/lib/active_model/type/helpers/timezone.rb @@ -4,8 +4,8 @@ module ActiveModel module Type - module Helpers # :nodoc: all - module Timezone + module Helpers # :nodoc: + module Timezone # :nodoc: def is_utc? ::Time.zone_default.nil? || ::Time.zone_default.match?("UTC") end diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb index 5ea03cb124ffb..df8b59716148b 100644 --- a/activemodel/lib/active_model/validations/acceptance.rb +++ b/activemodel/lib/active_model/validations/acceptance.rb @@ -24,7 +24,7 @@ def acceptable_option?(value) Array(options[:accept]).include?(value) end - class LazilyDefineAttributes < Module + class LazilyDefineAttributes < Module # :nodoc: def initialize(attributes) @attributes = attributes.map(&:to_s) end diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb index 45e04dca0d615..01222b3d5483e 100644 --- a/activerecord/lib/active_record/associations/preloader/association.rb +++ b/activerecord/lib/active_record/associations/preloader/association.rb @@ -4,7 +4,7 @@ module ActiveRecord module Associations class Preloader class Association # :nodoc: - class LoaderQuery + class LoaderQuery # :nodoc: attr_reader :scope, :association_key_name def initialize(scope, association_key_name) @@ -40,7 +40,7 @@ def load_records_for_keys(keys, &block) end end - class LoaderRecords + class LoaderRecords # :nodoc: def initialize(loaders, loader_query) @loader_query = loader_query @loaders = loaders diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb index e9a79526f9b70..ba6e327f0befa 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb @@ -26,7 +26,7 @@ def serialize(value) Data.new(super) if value end - class Data + class Data # :nodoc: def initialize(value) @value = value end diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb index 3d052d3b72eb0..614340d58eb2b 100644 --- a/activerecord/lib/active_record/dynamic_matchers.rb +++ b/activerecord/lib/active_record/dynamic_matchers.rb @@ -23,7 +23,7 @@ def method_missing(name, *arguments, &block) end end - class Method + class Method # :nodoc: @matchers = [] class << self @@ -90,7 +90,7 @@ def finder end end - class FindBy < Method + class FindBy < Method # :nodoc: Method.matchers << self def self.prefix @@ -102,7 +102,7 @@ def finder end end - class FindByBang < Method + class FindByBang < Method # :nodoc: Method.matchers << self def self.prefix diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb index aec6343a178f1..2a25ceb32c71d 100644 --- a/activerecord/lib/active_record/statement_cache.rb +++ b/activerecord/lib/active_record/statement_cache.rb @@ -61,7 +61,7 @@ def sql_for(binds, connection) end end - class PartialQueryCollector + class PartialQueryCollector # :nodoc: attr_accessor :preparable def initialize diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 0ec98fd901f0e..016563de75f59 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -840,7 +840,7 @@ def [](version) end end - module Loader + module Loader # :nodoc: extend self def load(payload) @@ -863,7 +863,7 @@ def load(payload) end end - module Rails61Coder + module Rails61Coder # :nodoc: include Loader extend self @@ -876,7 +876,7 @@ def dump_compressed(entry, threshold) end end - module Rails70Coder + module Rails70Coder # :nodoc: include Loader extend self diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 3c3210c945cf5..7efe56348d4ff 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -180,7 +180,7 @@ def [](version) end end - module Loader + module Loader # :nodoc: def load(payload) if payload.is_a?(Entry) payload @@ -190,7 +190,7 @@ def load(payload) end end - module Rails61Coder + module Rails61Coder # :nodoc: include Loader extend self @@ -203,7 +203,7 @@ def dump_compressed(entry, threshold) end end - module Rails70Coder + module Rails70Coder # :nodoc: include Cache::Coders::Rails70Coder include Loader extend self diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 777305d7da8d2..2f66c2cb2bd8a 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -148,7 +148,7 @@ def halted_callback_hook(filter, name) end module Conditionals # :nodoc: - class Value + class Value # :nodoc: def initialize(&block) @block = block end @@ -156,10 +156,10 @@ def call(target, value); @block.call(value); end end end - module Filters + module Filters # :nodoc: Environment = Struct.new(:target, :halted, :value) - class Before + class Before # :nodoc: def self.build(callback_sequence, user_callback, user_conditions, chain_config, filter, name) halted_lambda = chain_config[:terminator] @@ -209,7 +209,7 @@ def self.halting(callback_sequence, user_callback, halted_lambda, filter, name) private_class_method :halting end - class After + class After # :nodoc: def self.build(callback_sequence, user_callback, user_conditions, chain_config) if chain_config[:skip_after_callbacks_if_terminated] if user_conditions.any? @@ -373,7 +373,7 @@ def conditions_lambdas # A future invocation of user-supplied code (either as a callback, # or a condition filter). module CallTemplate # :nodoc: - class MethodCall + class MethodCall # :nodoc: def initialize(method) @method_name = method end @@ -408,7 +408,7 @@ def inverted_lambda end end - class ObjectCall + class ObjectCall # :nodoc: def initialize(target, method) @override_target = target @method_name = method @@ -431,7 +431,7 @@ def inverted_lambda end end - class InstanceExec0 + class InstanceExec0 # :nodoc: def initialize(block) @override_block = block end @@ -453,7 +453,7 @@ def inverted_lambda end end - class InstanceExec1 + class InstanceExec1 # :nodoc: def initialize(block) @override_block = block end @@ -475,7 +475,7 @@ def inverted_lambda end end - class InstanceExec2 + class InstanceExec2 # :nodoc: def initialize(block) @override_block = block end @@ -500,7 +500,7 @@ def inverted_lambda end end - class ProcCall + class ProcCall # :nodoc: def initialize(target) @override_target = target end diff --git a/activesupport/lib/active_support/code_generator.rb b/activesupport/lib/active_support/code_generator.rb index 46f612d2cff78..903a888f079f6 100644 --- a/activesupport/lib/active_support/code_generator.rb +++ b/activesupport/lib/active_support/code_generator.rb @@ -2,7 +2,7 @@ module ActiveSupport class CodeGenerator # :nodoc: - class MethodSet + class MethodSet # :nodoc: METHOD_CACHES = Hash.new { |h, k| h[k] = Module.new } def initialize(namespace) diff --git a/activesupport/lib/active_support/evented_file_update_checker.rb b/activesupport/lib/active_support/evented_file_update_checker.rb index bca31f4c57fa2..26d30eb514e1d 100644 --- a/activesupport/lib/active_support/evented_file_update_checker.rb +++ b/activesupport/lib/active_support/evented_file_update_checker.rb @@ -32,7 +32,7 @@ module ActiveSupport # checker.execute_if_updated # # => "changed" # - class EventedFileUpdateChecker # :nodoc: all + class EventedFileUpdateChecker # :nodoc: def initialize(files, dirs = {}, &block) unless block raise ArgumentError, "A block is required to initialize an EventedFileUpdateChecker" @@ -65,7 +65,7 @@ def execute_if_updated end end - class Core + class Core # :nodoc: attr_reader :updated def initialize(files, dirs) diff --git a/activesupport/lib/active_support/fork_tracker.rb b/activesupport/lib/active_support/fork_tracker.rb index bc1d32b5503b4..148a53f2b7b5d 100644 --- a/activesupport/lib/active_support/fork_tracker.rb +++ b/activesupport/lib/active_support/fork_tracker.rb @@ -2,7 +2,7 @@ module ActiveSupport module ForkTracker # :nodoc: - module ModernCoreExt + module ModernCoreExt # :nodoc: def _fork pid = super if pid == 0 @@ -12,7 +12,7 @@ def _fork end end - module CoreExt + module CoreExt # :nodoc: def fork(...) if block_given? super do @@ -28,7 +28,7 @@ def fork(...) end end - module CoreExtPrivate + module CoreExtPrivate # :nodoc: include CoreExt private :fork end diff --git a/activesupport/lib/active_support/messages/rotator.rb b/activesupport/lib/active_support/messages/rotator.rb index b19e1851e9870..71eff233331df 100644 --- a/activesupport/lib/active_support/messages/rotator.rb +++ b/activesupport/lib/active_support/messages/rotator.rb @@ -15,7 +15,7 @@ def rotate(*secrets, **options) @rotations << build_rotation(*secrets, @options.merge(options)) end - module Encryptor + module Encryptor # :nodoc: include Rotator def decrypt_and_verify(*args, on_rotation: @on_rotation, **options) @@ -30,7 +30,7 @@ def build_rotation(secret = @secret, sign_secret = @sign_secret, options) end end - module Verifier + module Verifier # :nodoc: include Rotator def verified(*args, on_rotation: @on_rotation, **options) diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index 666ac3dc7ba13..1aa33db29dd5b 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -173,7 +173,7 @@ def ===(name) pattern === name && !exclusions.include?(name) end - class AllMessages + class AllMessages # :nodoc: def ===(name) true end @@ -259,7 +259,7 @@ def finish(name, id, payload) end end - class EventObject < Evented + class EventObject < Evented # :nodoc: def start(name, id, payload) stack = IsolatedExecutionState[:_event_stack] ||= [] event = build_event name, id, payload diff --git a/activesupport/lib/active_support/testing/parallelization/server.rb b/activesupport/lib/active_support/testing/parallelization/server.rb index 3961367c24dd9..c059305f0b920 100644 --- a/activesupport/lib/active_support/testing/parallelization/server.rb +++ b/activesupport/lib/active_support/testing/parallelization/server.rb @@ -6,7 +6,7 @@ module ActiveSupport module Testing class Parallelization # :nodoc: - class Server + class Server # :nodoc: include DRb::DRbUndumped def initialize diff --git a/activesupport/lib/active_support/testing/parallelization/worker.rb b/activesupport/lib/active_support/testing/parallelization/worker.rb index 393355a25fe15..94df2fe83dd41 100644 --- a/activesupport/lib/active_support/testing/parallelization/worker.rb +++ b/activesupport/lib/active_support/testing/parallelization/worker.rb @@ -3,7 +3,7 @@ module ActiveSupport module Testing class Parallelization # :nodoc: - class Worker + class Worker # :nodoc: def initialize(number, url) @id = SecureRandom.uuid @number = number diff --git a/activesupport/lib/active_support/xml_mini/libxmlsax.rb b/activesupport/lib/active_support/xml_mini/libxmlsax.rb index 33d594c414091..b6158ae66d2c3 100644 --- a/activesupport/lib/active_support/xml_mini/libxmlsax.rb +++ b/activesupport/lib/active_support/xml_mini/libxmlsax.rb @@ -10,7 +10,7 @@ module XmlMini_LibXMLSAX # :nodoc: # Class that will build the hash while the XML document # is being parsed using SAX events. - class HashBuilder + class HashBuilder # :nodoc: include LibXML::XML::SaxParser::Callbacks CONTENT_KEY = "__content__" diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index f3ba109c98598..088af6acdfd80 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -15,7 +15,7 @@ module XmlMini_NokogiriSAX # :nodoc: # Class that will build the hash while the XML document # is being parsed using SAX events. - class HashBuilder < Nokogiri::XML::SAX::Document + class HashBuilder < Nokogiri::XML::SAX::Document # :nodoc: CONTENT_KEY = "__content__" HASH_SIZE_KEY = "__hash_size__" diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index ecb40c1592fcd..4ad8a0e71df90 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -240,7 +240,7 @@ def skip_sprockets? end - class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out) + class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out) # :nodoc: def initialize(name, version, comment, options = {}, commented_out = false) super end