Sha256: a1f8d9d4a463c3cf6c7b8c868c6a267adc670f9f3f7f99ab97dd93a792658f9b

Contents?: true

Size: 499 Bytes

Versions: 7

Compression:

Stored size: 499 Bytes

Contents

module Storefront
  module SystemHelper
    def windows?
      # Can't match for just 'win' cause it will match darwin as well.
      (/win32|mswin|mingw/).match(RUBY_PLATFORM) ? true : false
    end

    # Works on Debian and Ubuntu, don't have anything else to test on.
    def linux?
      (/linux/).match(RUBY_PLATFORM) ? true : false
    end

    # Works on my MacBook Pro, don't have anything else to test on,
    def mac?
      (/darwin/).match(RUBY_PLATFORM) ? true : false
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
storefront-0.3.2 lib/storefront/helpers/system_helper.rb
storefront-0.3.1 lib/storefront/helpers/system_helper.rb
storefront-0.3.0 lib/storefront/helpers/system_helper.rb
storefront-0.2.8 lib/storefront/helpers/system_helper.rb
storefront-0.2.7 lib/storefront/helpers/system_helper.rb
storefront-0.2.1 lib/storefront/helpers/system_helper.rb
storefront-0.2.0 lib/storefront/helpers/system_helper.rb