Class: Bindeps::System

Inherits:
Object
  • Object
show all
Defined in:
lib/bindeps.rb

Class Method Summary collapse

Class Method Details

.archObject



141
142
143
# File 'lib/bindeps.rb', line 141

def self.arch
  Gem::Platform.local.cpu == 'x86_64' ? '64bit' : '32bit'
end

.osObject



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/bindeps.rb', line 122

def self.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 UnsupportedSystemError,
            "can't install #{@name}, unknown os: #{host_os.inspect}"
    end
  )
end