Sha256: b62d5320090d072604a9e06a268ba3c030785e773998ab4d47ff56f17ad5793d
Contents?: true
Size: 797 Bytes
Versions: 17
Compression:
Stored size: 797 Bytes
Contents
# == PlatformManager::Windows # # A PlatformManager driver for Windows systems. class AutomateIt::PlatformManager::Windows < AutomateIt::PlatformManager::Struct def available? return RUBY_PLATFORM.match(/mswin/) ? true : false end def suitability(method, *args) # :nodoc: # Must be higher than PlatformManager::Struct return available? ? 3 : 0 end def _prepare return if @struct[:release] @struct[:os] = "windows" @struct[:arch] = ENV["PROCESSOR_ARCHITECTURE"] @struct[:distro] = "microsoft" # VER values: http://www.ss64.com/nt/ver.html @struct[:release] = `ver`.strip.match(/Windows (\w+)/)[1].downcase @struct end private :_prepare def query(search) _prepare super(search) end def single_vendor? return true end end
Version data entries
17 entries across 17 versions & 1 rubygems