Class: EC2::Platform::Linux::Architecture

Inherits:
Base::Architecture show all
Defined in:
lib/ec2/platform/linux/architecture.rb

Constant Summary

Constants inherited from Base::Architecture

Base::Architecture::I386, Base::Architecture::SUPPORTED, Base::Architecture::UNKNOWN, Base::Architecture::X86_64

Class Method Summary collapse

Methods inherited from Base::Architecture

supported?

Class Method Details

.bundlingObject


Returns the EC2-equivalent of the architecture of the platform this is running on.



25
26
27
28
29
30
31
# File 'lib/ec2/platform/linux/architecture.rb', line 25

def self.bundling
  processor = Uname.platform
  processor = Uname.machine if processor =~ /unknown/i
  return Architecture::I386 if processor =~ /^i\d86$/
  return Architecture::X86_64 if processor =~ /^x86_64$/
  return Architecture::UNKNOWN
end