Sha256: 14191b1b42686b4cbf863b1a7b77028d4562dbdb78009f85a4915458cc5615c5

Contents?: true

Size: 461 Bytes

Versions: 22

Compression:

Stored size: 461 Bytes

Contents

module Buildbox
  class Platform
    class << self
      [:cygwin, :darwin, :bsd, :freebsd, :linux, :solaris].each do |type|
        define_method("#{type}?") do
          platform.include?(type.to_s)
        end
      end

      def windows?
        %W[mingw mswin].each do |text|
          return true if platform.include?(text)
        end

        false
      end

      def platform
        RbConfig::CONFIG["host_os"].downcase
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
buildbox-0.6.2 lib/buildbox/platform.rb
buildbox-0.6.1 lib/buildbox/platform.rb
buildbox-0.7.beta1 lib/buildbox/platform.rb
buildbox-0.6 lib/buildbox/platform.rb
buildbox-0.6.beta3 lib/buildbox/platform.rb
buildbox-0.6.beta2 lib/buildbox/platform.rb
buildbox-0.6.beta1 lib/buildbox/platform.rb
buildbox-0.5 lib/buildbox/platform.rb
buildbox-0.4.2 lib/buildbox/platform.rb
buildbox-0.4.1 lib/buildbox/platform.rb
buildbox-0.4 lib/buildbox/platform.rb
buildbox-0.3.9.1 lib/buildbox/platform.rb
buildbox-0.3.9 lib/buildbox/platform.rb
buildbox-0.3.8 lib/buildbox/platform.rb
buildbox-0.3.7 lib/buildbox/platform.rb
buildbox-0.3.6 lib/buildbox/platform.rb
buildbox-0.3.5 lib/buildbox/platform.rb
buildbox-0.3.4 lib/buildbox/platform.rb
buildbox-0.3.3 lib/buildbox/platform.rb
buildbox-0.3.2 lib/buildbox/platform.rb