Sha256: 192532db80d4d8ab46efe17a723ce1a656bb46bf1bc8b8621e50012d35d99cbc
Contents?: true
Size: 687 Bytes
Versions: 14
Compression:
Stored size: 687 Bytes
Contents
require 'rbconfig' #Shameless copy of Vagrant code module Mccloud module Util # This class just contains some platform checking code. class Platform class << self def tiger? platform.include?("darwin8") end def leopard? platform.include?("darwin9") end def windows? platform.include?("mswin") || platform.include?("mingw") end [:darwin, :bsd, :linux].each do |type| define_method("#{type}?") do platform.include?(type.to_s) end end def platform RbConfig::CONFIG["host_os"].downcase end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems