Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Specification#requirements
requirements
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification.rb, line 723
def requirements
@requirements ||= []
end
Lists the external (to RubyGems) requirements that must be met for this gem to work. It’s simply information for the user.
Usage:
Example
spec.requirements << 'libmagick, v6.0' spec.requirements << 'A good graphics card'
See also
#requirements=
#required_ruby_version=
#required_rubygems_version=
#require_path
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0