Sha256: 32711cc2df884ea3de6c366d92f0564dfb0fc1af106a7542c8459d6df94d7c20

Contents?: true

Size: 494 Bytes

Versions: 3

Compression:

Stored size: 494 Bytes

Contents

require 'rbconfig'
module Notifyor
  module Util
    module OSAnalyzer
      extend self
      def os
        host_os = RbConfig::CONFIG['host_os']
        case host_os
          when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
            :windows
          when /darwin|mac os/
            :macosx
          when /linux/
            :linux
          when /solaris|bsd/
            :unix
          else
            raise "unknown os: #{host_os.inspect}"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
notifyor-0.8.1 lib/notifyor/util/os_analyzer.rb
notifyor-0.8.0 lib/notifyor/util/os_analyzer.rb
notifyor-0.6.0 lib/notifyor/util/os_analyzer.rb