Module: AssLauncher::Cmd::Abstract::Option::Arch Private

Included in:
Run, Main::SubCommands::MakeIb
Defined in:
lib/ass_launcher/cmd.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Mixin Command option

API:

  • private

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



459
460
461
462
463
464
465
466
467
# File 'lib/ass_launcher/cmd.rb', line 459

def self.included(base)
  base.option '--arch', 'ARCH',
    'specify x86_64 or i386 platform arch' do |s|
    fail ArgumentError, "Invalid arch `#{s}'."\
      " Valid values #{expected_archs.join('|')}" unless\
      expected_archs.include? s
    s
  end
end

Instance Method Details

#arch_any?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



473
474
475
# File 'lib/ass_launcher/cmd.rb', line 473

def arch_any?
  arch.nil?
end

#expected_archsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



454
455
456
457
# File 'lib/ass_launcher/cmd.rb', line 454

def expected_archs
  [AssLauncher::Enterprise::BinaryWrapper::X86_64,
   AssLauncher::Enterprise::BinaryWrapper::I386]
end

#x86_64?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



469
470
471
# File 'lib/ass_launcher/cmd.rb', line 469

def x86_64?
  arch.to_s == AssLauncher::Enterprise::BinaryWrapper::X86_64
end