Module: Ronin::Model::TargetsArch::InstanceMethods

Defined in:
lib/ronin/model/targets_arch.rb

Instance Method Summary collapse

Instance Method Details

#targets_arch(name) ⇒ Arch

Sets the targeted architecture.

Examples:

t.targets_arch :x86
# => #<Ronin::Arch: x86>

Since:

  • 1.0.0


94
95
96
97
98
99
100
# File 'lib/ronin/model/targets_arch.rb', line 94

def targets_arch(name)
  unless Arch.methods(false).include?(name)
    raise(ArgumentError,"unknown arch: #{name}")
  end

  self.arch = Arch.send(name)
end