Sha256: b066b917c6009eb854b04ca79f244e9fc9731fcee7ee392f4ef808c488f9149e
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
= RubyVersion {<img src="https://travis-ci.org/janlelis/ruby_version.png" />}[https://travis-ci.org/janlelis/ruby_version] Provides a +RubyVersion+ to simplify checking for the right Ruby version in your programs. == Setup On your command-line: $ gem install ruby_version In Ruby: require 'ruby_version' == Usage # return RUBY_VERSION RubyVersion # check for the main version with a Float RubyVersion.is? 1.8 # use strings for exacter checking RubyVersion.is.above '1.8.7' RubyVersion.is.at_least '1.8.7' # or exactly, below, at_most # you can use the common comparison operators RubyVersion >= '1.8.7' RubyVersion.between? '1.8.6', '1.8.7' # relase date checks RubyVersion.is.older_than Date.today RubyVersion.is.newer_than '2009-08-19' # accessors RubyVersion.major # e.g. => 1 RubyVersion.minor # e.g. => 8 RubyVersion.tiny # e.g. => 7 RubyVersion.patchlevel # e.g. => 249 RubyVersion.description # e.g. => "ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]" == J-_-L Copyright (c) 2010-2014 Jan Lelis. MIT License. Originated from the zucker gem.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_version-1.0.0 | README.rdoc |