Module: Guards

Defined in:
lib/ar_loader.rb

Class Method Summary collapse

Class Method Details

.jruby?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ar_loader.rb', line 13

def self.jruby?
  return RUBY_PLATFORM == "java"
end

.linux?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ar_loader.rb', line 20

def self.linux?
  RbConfig::CONFIG['target_os'] =~ /linux/i
end

.mac?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ar_loader.rb', line 16

def self.mac?
  RbConfig::CONFIG['target_os'] =~ /darwin/i
end

.windows?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/ar_loader.rb', line 24

def self.windows?
  RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
end