Skip to content

Commit

Permalink
Use :nodoc: to limit public API (#2988)
Browse files Browse the repository at this point in the history
Client, Cluster::Worker, Cluster::WorkerHandle, Request
  • Loading branch information
MSP-Greg committed Oct 12, 2022
1 parent 2719585 commit 8159aa4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion lib/puma/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class ConnectionError < RuntimeError; end

class HttpParserError501 < IOError; end

#———————————————————————— DO NOT USE — this class is for internal use only ———


# An instance of this class represents a unique request from a client.
# For example, this could be a web request from a browser or from CURL.
#
Expand All @@ -38,7 +41,7 @@ class HttpParserError501 < IOError; end
# the header and body are fully buffered via the `try_to_finish` method.
# They can be used to "time out" a response via the `timeout_at` reader.
#
class Client
class Client # :nodoc:

# this tests all values but the last, which must be chunked
ALLOWED_TRANSFER_ENCODING = %w[compress deflate gzip].freeze
Expand Down
5 changes: 4 additions & 1 deletion lib/puma/cluster/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

module Puma
class Cluster < Puma::Runner
#—————————————————————— DO NOT USE — this class is for internal use only ———


# This class is instantiated by the `Puma::Cluster` and represents a single
# worker process.
#
# At the core of this class is running an instance of `Puma::Server` which
# gets created via the `start_server` method from the `Puma::Runner` class
# that this inherits from.
class Worker < Puma::Runner
class Worker < Puma::Runner # :nodoc:
attr_reader :index, :master

def initialize(index:, master:, launcher:, pipes:, server: nil)
Expand Down
5 changes: 4 additions & 1 deletion lib/puma/cluster/worker_handle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

module Puma
class Cluster < Runner
#—————————————————————— DO NOT USE — this class is for internal use only ———


# This class represents a worker process from the perspective of the puma
# master process. It contains information about the process and its health
# and it exposes methods to control the process via IPC. It does not
# include the actual logic executed by the worker process itself. For that,
# see Puma::Cluster::Worker.
class WorkerHandle
class WorkerHandle # :nodoc:
def initialize(idx, pid, phase, options)
@index = idx
@pid = pid
Expand Down
4 changes: 3 additions & 1 deletion lib/puma/request.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

module Puma
#———————————————————————— DO NOT USE — this class is for internal use only ———


# The methods here are included in Server, but are separated into this file.
# All the methods here pertain to passing the request to the app, then
Expand All @@ -10,7 +12,7 @@ module Puma
# #handle_request, which is called in Server#process_client.
# @version 5.0.3
#
module Request
module Request # :nodoc:

# determines whether to write body to io_buffer first, or straight to socket
# also fixes max size of chunked body read when bosy is an IO.
Expand Down

0 comments on commit 8159aa4

Please sign in to comment.