Module: Whichr
- Defined in:
- lib/whichr.rb
Instance Method Summary collapse
- #copyright ⇒ Object
- #description ⇒ Object
- #engine ⇒ Object
- #patchlevel ⇒ Object
- #platform ⇒ Object
-
#r_type ⇒ Object
TODO add some name mapping rbx vs rubinius f.e.
- #release_date ⇒ Object
- #revision ⇒ Object
- #version ⇒ Object
- #which_r?(ruby) ⇒ Boolean (also: #r?)
Instance Method Details
#copyright ⇒ Object
25 26 27 |
# File 'lib/whichr.rb', line 25 def copyright RUBY_COPYRIGHT end |
#description ⇒ Object
21 22 23 |
# File 'lib/whichr.rb', line 21 def description RUBY_DESCRIPTION end |
#engine ⇒ Object
47 48 49 50 51 |
# File 'lib/whichr.rb', line 47 def engine RUBY_ENGINE rescue nil end |
#patchlevel ⇒ Object
29 30 31 |
# File 'lib/whichr.rb', line 29 def patchlevel RUBY_PATCHLEVEL end |
#platform ⇒ Object
33 34 35 |
# File 'lib/whichr.rb', line 33 def platform RUBY_PLATFORM end |
#r_type ⇒ Object
TODO add some name mapping rbx vs rubinius f.e.
5 6 7 8 9 |
# File 'lib/whichr.rb', line 5 def r_type return :"#{engine.downcase}" unless engine.nil? description.match(/\A([^\s]+)/) :"#{$1.downcase}" end |
#release_date ⇒ Object
37 38 39 |
# File 'lib/whichr.rb', line 37 def release_date RUBY_RELEASE_DATE end |
#revision ⇒ Object
41 42 43 44 45 |
# File 'lib/whichr.rb', line 41 def revision RUBY_REVISION rescue nil end |
#version ⇒ Object
17 18 19 |
# File 'lib/whichr.rb', line 17 def version RUBY_VERSION end |
#which_r?(ruby) ⇒ Boolean Also known as: r?
11 12 13 |
# File 'lib/whichr.rb', line 11 def which_r?(ruby) r_type == ruby end |