Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply :nodoc: to nested classes and modules [ci-skip] #44506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion actioncable/lib/action_cable/subscription_adapter/async.rb
Expand Up @@ -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()
Expand Down
Expand Up @@ -71,7 +71,7 @@ def verify!(pg_conn)
end
end

class Listener < SubscriberMap
class Listener < SubscriberMap # :nodoc:
def initialize(adapter, event_loop)
super()

Expand Down
2 changes: 1 addition & 1 deletion actioncable/lib/action_cable/subscription_adapter/redis.rb
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/live.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/http/response.rb
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions actionpack/lib/action_dispatch/routing/inspector.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -239,7 +239,7 @@ def route_header(index:)
end
end

class HtmlTableFormatter
class HtmlTableFormatter # :nodoc:
def initialize(view)
@view = view
@buffer = []
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/testing/request_encoder.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/renderer/abstract_renderer.rb
Expand Up @@ -127,7 +127,7 @@ def format
rendered_templates.first.format
end

class EmptyCollection
class EmptyCollection # :nodoc:
attr_reader :format

def initialize(format)
Expand Down
3 changes: 1 addition & 2 deletions actionview/lib/action_view/template/handlers/erb/erubi.rb
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions actionview/lib/action_view/template/types.rb
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/template_details.rb
Expand Up @@ -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

Expand Down
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/type/helpers/mutable.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/type/helpers/numeric.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/type/helpers/time_value.rb
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions activemodel/lib/active_model/type/helpers/timezone.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion activemodel/lib/active_model/validations/acceptance.rb
Expand Up @@ -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
Expand Down
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -26,7 +26,7 @@ def serialize(value)
Data.new(super) if value
end

class Data
class Data # :nodoc:
def initialize(value)
@value = value
end
Expand Down
6 changes: 3 additions & 3 deletions activerecord/lib/active_record/dynamic_matchers.rb
Expand Up @@ -23,7 +23,7 @@ def method_missing(name, *arguments, &block)
end
end

class Method
class Method # :nodoc:
@matchers = []

class << self
Expand Down Expand Up @@ -90,7 +90,7 @@ def finder
end
end

class FindBy < Method
class FindBy < Method # :nodoc:
Method.matchers << self

def self.prefix
Expand All @@ -102,7 +102,7 @@ def finder
end
end

class FindByBang < Method
class FindByBang < Method # :nodoc:
Method.matchers << self

def self.prefix
Expand Down
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/statement_cache.rb
Expand Up @@ -61,7 +61,7 @@ def sql_for(binds, connection)
end
end

class PartialQueryCollector
class PartialQueryCollector # :nodoc:
attr_accessor :preparable

def initialize
Expand Down
6 changes: 3 additions & 3 deletions activesupport/lib/active_support/cache.rb
Expand Up @@ -840,7 +840,7 @@ def [](version)
end
end

module Loader
module Loader # :nodoc:
extend self

def load(payload)
Expand All @@ -863,7 +863,7 @@ def load(payload)
end
end

module Rails61Coder
module Rails61Coder # :nodoc:
include Loader
extend self

Expand All @@ -876,7 +876,7 @@ def dump_compressed(entry, threshold)
end
end

module Rails70Coder
module Rails70Coder # :nodoc:
include Loader
extend self

Expand Down
6 changes: 3 additions & 3 deletions activesupport/lib/active_support/cache/mem_cache_store.rb
Expand Up @@ -180,7 +180,7 @@ def [](version)
end
end

module Loader
module Loader # :nodoc:
def load(payload)
if payload.is_a?(Entry)
payload
Expand All @@ -190,7 +190,7 @@ def load(payload)
end
end

module Rails61Coder
module Rails61Coder # :nodoc:
include Loader
extend self

Expand All @@ -203,7 +203,7 @@ def dump_compressed(entry, threshold)
end
end

module Rails70Coder
module Rails70Coder # :nodoc:
include Cache::Coders::Rails70Coder
include Loader
extend self
Expand Down
20 changes: 10 additions & 10 deletions activesupport/lib/active_support/callbacks.rb
Expand Up @@ -148,18 +148,18 @@ def halted_callback_hook(filter, name)
end

module Conditionals # :nodoc:
class Value
class Value # :nodoc:
def initialize(&block)
@block = block
end
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]

Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -408,7 +408,7 @@ def inverted_lambda
end
end

class ObjectCall
class ObjectCall # :nodoc:
def initialize(target, method)
@override_target = target
@method_name = method
Expand All @@ -431,7 +431,7 @@ def inverted_lambda
end
end

class InstanceExec0
class InstanceExec0 # :nodoc:
def initialize(block)
@override_block = block
end
Expand All @@ -453,7 +453,7 @@ def inverted_lambda
end
end

class InstanceExec1
class InstanceExec1 # :nodoc:
def initialize(block)
@override_block = block
end
Expand All @@ -475,7 +475,7 @@ def inverted_lambda
end
end

class InstanceExec2
class InstanceExec2 # :nodoc:
def initialize(block)
@override_block = block
end
Expand All @@ -500,7 +500,7 @@ def inverted_lambda
end
end

class ProcCall
class ProcCall # :nodoc:
def initialize(target)
@override_target = target
end
Expand Down