Module: Echoe::Platform
- Defined in:
- lib/echoe/platform.rb
Class Method Summary collapse
- .gcc? ⇒ Boolean
- .java? ⇒ Boolean
- .make ⇒ Object
- .msvc? ⇒ Boolean
- .rake ⇒ Object
- .suffix ⇒ Object
- .windows? ⇒ Boolean
Class Method Details
.gcc? ⇒ Boolean
11 12 13 14 |
# File 'lib/echoe/platform.rb', line 11 def self.gcc? @gcc ||= RUBY_PLATFORM =~ /mingw/ !@gcc.nil? end |
.java? ⇒ Boolean
21 22 23 24 |
# File 'lib/echoe/platform.rb', line 21 def self.java? @java ||= RUBY_PLATFORM =~ /java/ !@java.nil? end |
.make ⇒ Object
34 35 36 |
# File 'lib/echoe/platform.rb', line 34 def self.make msvc? ? 'nmake' : 'make' end |
.msvc? ⇒ Boolean
16 17 18 19 |
# File 'lib/echoe/platform.rb', line 16 def self.msvc? @msvc ||= RUBY_PLATFORM =~ /mswin/ !@msvc.nil? end |
.rake ⇒ Object
30 31 32 |
# File 'lib/echoe/platform.rb', line 30 def self.rake windows? ? "rake#{suffix}.bat" : "rake#{suffix}" end |
.suffix ⇒ Object
26 27 28 |
# File 'lib/echoe/platform.rb', line 26 def self.suffix @suffix ||= Gem.default_exec_format[2..-1] end |
.windows? ⇒ Boolean
6 7 8 9 |
# File 'lib/echoe/platform.rb', line 6 def self.windows? @windows ||= RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ !@windows.nil? end |