Module: Buff::Platform

Extended by:
Platform
Included in:
Platform, Kernel
Defined in:
lib/buff/platform.rb,
lib/buff/platform/version.rb

Constant Summary collapse

VERSION =
"1.0.0"

Instance Method Summary collapse

Instance Method Details

#linux?Boolean

Returns:

  • (Boolean)


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

def linux?
  (RbConfig::CONFIG['host_os'] =~ /linux/) ? true : false
end

#osx?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/buff/platform.rb', line 15

def osx?
  (RbConfig::CONFIG['host_os'] =~ /darwin/) ? true : false
end

#windows?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/buff/platform.rb', line 10

def windows?
  (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/) ? true : false
end