Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Command#get_one_optional_argument
get_one_optional_argument
lib/rubygems/command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/command.rb, line 239
def get_one_optional_argument
args = options[:args] || []
args.first
end
Get a single optional argument from the command line. If more than one argument is given, return only the first. Return nil if none are given.
See also
#get_one_gem_name
#handle_options
#get_all_gem_names_and_versions
#handles?
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0