class Rex::Struct2::CStructTemplate

Attributes

template[RW]
template_apply_restraint[RW]
template_create_restraints[RW]

Public Class Methods

new(*tem) click to toggle source
# File lib/rex/struct2/c_struct_template.rb, line 13
def initialize(*tem)
  self.template = tem
  self.template_create_restraints = [ ]
  self.template_apply_restraint = [ ]
end

Public Instance Methods

apply_restraint(*ress) click to toggle source
# File lib/rex/struct2/c_struct_template.rb, line 24
def apply_restraint(*ress)
  self.template_apply_restraint = ress
  return self
end
create_restraints(*ress) click to toggle source
# File lib/rex/struct2/c_struct_template.rb, line 19
def create_restraints(*ress)
  self.template_create_restraints = ress
  return self
end
make_struct() click to toggle source
# File lib/rex/struct2/c_struct_template.rb, line 29
def make_struct
  Rex::Struct2::CStruct.new(*self.template).
    create_restraints(*self.template_create_restraints).
    apply_restraint(*self.template_apply_restraint)
end