File: platform_helper.rb

package info (click to toggle)
ruby-guard 2.18.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,380 kB
  • sloc: ruby: 9,256; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 217 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

def mac?
  RbConfig::CONFIG["target_os"] =~ /darwin/i
end

def linux?
  RbConfig::CONFIG["target_os"] =~ /linux/i
end

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