Sha256: 9f6be2a05184b6fecf8332fb49a29e983861c081a726a2708579823464a1fb80

Contents?: true

Size: 623 Bytes

Versions: 15

Compression:

Stored size: 623 Bytes

Contents

require 'rbconfig'

module Quandl::Utility
module Config
class << self
  
  def windows?
    host_os == :windows
  end
  
  def macosx?
    host_os == :macosx
  end
  
  def linux?
    host_os == :linux
  end
  
  def unix?
    host_os == :unix
  end
  
  def host_os
    @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 Error::WebDriverError, "unknown os: #{host_os.inspect}"
    end
    )
  end
  
end
end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
quandl-0.4.4 lib/quandl/utility/config.rb
quandl-0.4.3 lib/quandl/utility/config.rb
quandl-0.4.2 lib/quandl/utility/config.rb
quandl-0.4.1 lib/quandl/utility/config.rb
quandl-0.4.0 lib/quandl/utility/config.rb
quandl-0.3.7 lib/quandl/utility/config.rb
quandl-0.3.6 lib/quandl/utility/config.rb
quandl-0.3.4 lib/quandl/utility/config.rb
quandl-0.3.3 lib/quandl/utility/config.rb
quandl-0.3.0 lib/quandl/utility/config.rb
quandl-0.2.27 lib/quandl/utility/config.rb
quandl-0.2.26 lib/quandl/utility/config.rb
quandl-0.2.25 lib/quandl/utility/config.rb
quandl-0.2.24 lib/quandl/utility/config.rb
quandl-0.2.22 lib/quandl/utility/config.rb