Module: Platform
- Defined in:
- lib/echoe/platform.rb
Overview
Platform check regexes
Class Method Summary collapse
Class Method Details
.gcc? ⇒ Boolean
10 11 12 13 |
# File 'lib/echoe/platform.rb', line 10 def self.gcc? @gcc ||= RUBY_PLATFORM =~ /mingw/ !@gcc.nil? end |
.java? ⇒ Boolean
20 21 22 23 |
# File 'lib/echoe/platform.rb', line 20 def self.java? @java ||= RUBY_PLATFORM =~ /java/ !@java.nil? end |
.make ⇒ Object
29 30 31 |
# File 'lib/echoe/platform.rb', line 29 def self.make msvc? ? 'nmake' : 'make' end |
.msvc? ⇒ Boolean
15 16 17 18 |
# File 'lib/echoe/platform.rb', line 15 def self.msvc? @msvc ||= RUBY_PLATFORM =~ /mswin/ !@msvc.nil? end |
.rake ⇒ Object
25 26 27 |
# File 'lib/echoe/platform.rb', line 25 def self.rake windows? ? 'rake.bat' : 'rake' end |
.windows? ⇒ Boolean
5 6 7 8 |
# File 'lib/echoe/platform.rb', line 5 def self.windows? @windows ||= RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ !@windows.nil? end |