Class: Mixlibrary::Core::Utilities::RubyInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/mixlibrary/core/utilities/ruby_info.rb

Class Method Summary collapse

Class Method Details

.architectureObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mixlibrary/core/utilities/ruby_info.rb', line 16

def self.architecture
  #x64-mingw32
  #i386-mingw32
  myarch = RbConfig::CONFIG["arch"]
  if(myarch.upcase.include?("I386"))
    return :i386
  elsif (myarch.upcase.include?("X64"))
    return :x86_64
  else
    raise "Unsupported arch found: #{myarch}"
  end
end

.windows?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/mixlibrary/core/utilities/ruby_info.rb', line 8

def self.windows?
  if RUBY_PLATFORM =~ /mswin|mingw|windows/
    true
  else
    false
  end
end