Sha256: bfd3b61e68eceab3fa0db531c7a406adaf1f05a63696415cd9eebc9f8c244924

Contents?: true

Size: 586 Bytes

Versions: 15

Compression:

Stored size: 586 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

        [: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

15 entries across 15 versions & 1 rubygems

Version Path
mccloud-0.0.15 lib/mccloud/util/platform.rb
mccloud-0.0.14 lib/mccloud/util/platform.rb
mccloud-0.0.13 lib/mccloud/util/platform.rb
mccloud-0.0.12 lib/mccloud/util/platform.rb
mccloud-0.0.11 lib/mccloud/util/platform.rb
mccloud-0.0.10 lib/mccloud/util/platform.rb
mccloud-0.0.9 lib/mccloud/util/platform.rb
mccloud-0.0.8 lib/mccloud/util/platform.rb
mccloud-0.0.7 lib/mccloud/util/platform.rb
mccloud-0.0.6 lib/mccloud/util/platform.rb
mccloud-0.0.5 lib/mccloud/util/platform.rb
mccloud-0.0.4 lib/mccloud/util/platform.rb
mccloud-0.0.3 lib/mccloud/util/platform.rb
mccloud-0.0.2 lib/mccloud/util/platform.rb
mccloud-0.0.1 lib/mccloud/util/platform.rb