Ruby YARD の使い方

Improved YARD cheatsheet

# An alias to {Parser::SourceParser}'s parsing method
#
# @see http://example.com Description of URL
# @see SomeOtherClass#method
# @return [optional, types, ...] description
# @return [true] always returns true
# @return [void]
# @return [String, nil] the contents of our object or nil
#   if the object has not been filled with data.
# @example Reverse a string
#   "mystring".reverse #=> "gnirtsym"
#
# @example Parse a glob of files
#   YARD.parse('lib/**/*.rb')
# @param [Hash] opts the options to create a message with.
# @option opts [String] :subject The subject
# @option opts [String] :from ('nobody') From address
# @option opts [String] :to Recipient email
# @option opts [String] :body ('') The email's body
#
# @param (see User#initialize)
# @param [OptionParser] opts the option parser object
# @param [Array<String>] args the arguments passed from input. This
#   array will be modified.
# @param [Array<String, Symbol>] list the list of strings and symbols.
# @param [Hash<Symbol, String>] a hash with symbol keys and string values

rubyのキーワード引数のあるメソッドをYardで書く方法 - Qiita

# @param [Hash] opts the options to create a message with.
# @option opts [String] :subject The subject
# @option opts [String] :from ('nobody') From address
# @option opts [String] :to Recipient email
# @option opts [String] :body ('') The email's body
def send_email(opts = {}) end
# @param [String] subject The subject
# @param [String] from ('nobody') From address
# @param [String] to Recipient email
# @param [String] body ('') The email's body
def send_email(subject: nil, from: nil, to: nil, body: nil) end

Coding Music

Rails 7.0 Alpha 1

Rails 7.0 Alpha 1: New JavaScript Answers, At-Work Encryption, Query Origin Logging, Zeitwerk Exclusively | Riding Rails

ちなみにすでに alpha2 が出ている模様。

rails | RubyGems.org