Standardize :doc: comments [ci skip]

This commit is contained in:
Ryuta Kamizono 2021-08-06 17:10:45 +09:00
parent 6e7e8128d2
commit b87d8e51d4
6 changed files with 12 additions and 12 deletions

View File

@ -66,7 +66,7 @@ module ActionController # :nodoc:
# https://www.mnot.net/cache_docs/ for an overview of web caching and
# https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
# for the Cache-Control header spec.
def send_file(path, options = {}) #:doc:
def send_file(path, options = {}) # :doc:
raise MissingFile, "Cannot read file #{path}" unless File.file?(path) && File.readable?(path)
options[:filename] ||= File.basename(path) unless options[:url_based_filename]
@ -106,7 +106,7 @@ module ActionController # :nodoc:
# send_data image.data, type: image.content_type, disposition: 'inline'
#
# See +send_file+ for more information on HTTP Content-* headers and caching.
def send_data(data, options = {}) #:doc:
def send_data(data, options = {}) # :doc:
send_file_headers! options
render options.slice(:status, :content_type).merge(body: data)
end

View File

@ -48,7 +48,7 @@ module ActionController # :nodoc:
end
private
def redirect_to(options = {}, response_options_and_flash = {}) #:doc:
def redirect_to(options = {}, response_options_and_flash = {}) # :doc:
self.class._flash_types.each do |flash_type|
if type = response_options_and_flash.delete(flash_type)
flash[flash_type] = type

View File

@ -8,7 +8,7 @@ module ActiveStorage::Streaming
private
# Stream the blob from storage directly to the response. The disposition can be controlled by setting +disposition+.
# The content type and filename is set directly from the +blob+.
def send_blob_stream(blob, disposition: nil) #:doc:
def send_blob_stream(blob, disposition: nil) # :doc:
send_stream(
filename: blob.filename.sanitized,
disposition: blob.forced_disposition_for_serving || disposition || DEFAULT_BLOB_STREAMING_DISPOSITION,

View File

@ -29,15 +29,15 @@ module ActiveStorage
private
# Downloads the blob to a tempfile on disk. Yields the tempfile.
def download_blob_to_tempfile(&block) #:doc:
def download_blob_to_tempfile(&block) # :doc:
blob.open tmpdir: tmpdir, &block
end
def logger #:doc:
def logger # :doc:
ActiveStorage.logger
end
def tmpdir #:doc:
def tmpdir # :doc:
Dir.tmpdir
end
end

View File

@ -26,7 +26,7 @@ module ActiveStorage
private
# Downloads the blob to a tempfile on disk. Yields the tempfile.
def download_blob_to_tempfile(&block) #:doc:
def download_blob_to_tempfile(&block) # :doc:
blob.open tmpdir: tmpdir, &block
end
@ -44,7 +44,7 @@ module ActiveStorage
# end
#
# The output tempfile is opened in the directory returned by #tmpdir.
def draw(*argv) #:doc:
def draw(*argv) # :doc:
open_tempfile do |file|
instrument :preview, key: blob.key do
capture(*argv, to: file)
@ -83,11 +83,11 @@ module ActiveStorage
to.rewind
end
def logger #:doc:
def logger # :doc:
ActiveStorage.logger
end
def tmpdir #:doc:
def tmpdir # :doc:
Dir.tmpdir
end
end

View File

@ -31,7 +31,7 @@ module ActiveStorage
private
# Returns an open Tempfile containing a transformed image in the given +format+.
# All subclasses implement this method.
def process(file, format:) #:doc:
def process(file, format:) # :doc:
raise NotImplementedError
end
end