Sha256: 9d8f52ca1c97163a5c3a7a9d5d5a990b662b9a0554c58f206fe549972910995b
Contents?: true
Size: 452 Bytes
Versions: 28
Compression:
Stored size: 452 Bytes
Contents
require 'rbconfig' module Maid::Platform class << self def host_os RbConfig::CONFIG['host_os'] end def linux? !!(host_os =~ /linux/i) end def osx? !!(host_os =~ /darwin/i) end end # Commands based on OS type class Commands class << self # logicaly decides which locate command to use def locate Maid::Platform.linux? ? 'locate' : 'mdfind -name' end end end end
Version data entries
28 entries across 28 versions & 1 rubygems