lib/ronin/model/targets_arch.rb in ronin-exploits-0.2.0 vs lib/ronin/model/targets_arch.rb in ronin-exploits-0.2.1
- old
+ new
@@ -19,36 +19,34 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#++
#
-require 'ronin/targeted_arch'
+require 'ronin/arch'
module Ronin
module Model
module TargetsArch
def self.included(base)
base.module_eval do
- # The payloads targeted architecture
- belongs_to :arch,
- :child_key => [:arch_id],
- :class_name => 'Ronin::TargetedArch'
+ # The targeted architecture
+ belongs_to :arch
#
# Returns the current targeted arch if no _name_ is given. If a
- # _name_ is given, a new TargetedArch object will be created
- # with the given _name_ and associated with the target.
+ # _name_ is given, a new Arch object will be created with the
+ # given _name_ and associated with the target.
#
# target.arch
# # => nil
#
# target.arch :i686
- # # => #<Ronin::TargetedArch type=Ronin::TargetedArch id=nil
- # # name="i686" endian="little" address_length=4>
+ # # => #<Ronin::Arch type=Ronin::Arch id=nil name="i686"
+ # # endian="little" address_length=4>
#
def arch(name=nil)
if name
- return self.arch = TargetedArch[name]
+ return self.arch = Arch[name]
else
return arch_association
end
end
end