【文件属性】:
文件名称:ruby_version:Ruby版 | 比RUBY_VERSION好
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-31 10:57:56
ruby version-check Ruby
Ruby 版本
提供RubyVersion以简化在程序中检查正确 Ruby 版本的过程。
安装
在您的命令行上:
$ gem install ruby_version
在Ruby中:
require 'ruby_version'
用法
# Output RUBY_VERSION
RubyVersion . to_s
# Check for the main version with a Float
RubyVersion . is? 2.1
# Use strings for exacter checking
RubyVersion . is . above '1.9.2'
RubyVersion . is . at_least '2.0.0' # or exactly, below, at_most
# You can use the common comparison o
【文件预览】:
ruby_version-main
----Rakefile(602B)
----.github()
--------workflows()
----ruby_version.gemspec(1022B)
----README.rdoc(1KB)
----Gemfile(40B)
----.rspec(32B)
----spec()
--------ruby_version_spec.rb(2KB)
--------spec_helper.rb(323B)
----.gitignore(17B)
----lib()
--------ruby_version.rb(2KB)
----ChangeLog.md(214B)
----LICENSE.txt(1KB)