Sha256: c0a2af56348b6e538e37cd0469ef50af78a75cad76b5178e8f5293f6b5d8f60a

Contents?: true

Size: 275 Bytes

Versions: 3

Compression:

Stored size: 275 Bytes

Contents

# frozen_string_literal: true

# Returns true if we run on a windows platform
#
# Sample:
#
#  puts "Windows" if Kernel.is_windows?
#
# http://snippets.dzone.com/posts/show/2112
#
def Kernel.is_windows?
  _, platform, _ = RUBY_PLATFORM.split('-')
  platform == 'mingw32'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dropcaster-1.2.0 test/extensions/windows.rb
dropcaster-1.1.0 test/extensions/windows.rb
dropcaster-1.0.0 test/extensions/windows.rb