Ruby 4.1 リファレンスマニュアル

singleton method Gem::Platform.installable?

installable?(spec) -> boolRuby 2.1.0 から[permalink][rdoc][edit]

spec が現在の環境にインストール可能かどうかを返します。

spec が installable_platform? に応答する場合はその結果を、応答しない場合は Gem::Platform.match_spec? の結果を返します。

[PARAM] spec:
判定したい Gem::Specification のインスタンスを指定します。
例
spec = Gem::Specification.new("rake", "1.0.0")
spec.platform = Gem::Platform::RUBY
p Gem::Platform.installable?(spec) # => true

[SEE_ALSO] Gem::Platform.match_spec?