Sha256: 3d9a32d399a1c142990b4f901e3378ddb717259942e0ccc7eade0bc2d6e34fae

Contents?: true

Size: 830 Bytes

Versions: 21

Compression:

Stored size: 830 Bytes

Contents

# -*- coding: binary -*-

# Rex::Struct2
module Rex
module Struct2

class CStructTemplate

  require 'rex/struct2/c_struct'

  attr_reader  :template, :template_create_restraints, :template_apply_restraint
  attr_writer  :template, :template_create_restraints, :template_apply_restraint

  def initialize(*tem)
    self.template = tem
    self.template_create_restraints = [ ]
    self.template_apply_restraint = [ ]
  end

  def create_restraints(*ress)
    self.template_create_restraints = ress
    return self
  end

  def apply_restraint(*ress)
    self.template_apply_restraint = ress
    return self
  end

  def make_struct
    Rex::Struct2::CStruct.new(*self.template).
      create_restraints(*self.template_create_restraints).
      apply_restraint(*self.template_apply_restraint)
  end
end

# end Rex::Struct2
end
end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
rex-struct2-0.1.5 lib/rex/struct2/c_struct_template.rb
rex-struct2-0.1.4 lib/rex/struct2/c_struct_template.rb
rex-struct2-0.1.3 lib/rex/struct2/c_struct_template.rb
rex-2.0.13 lib/rex/struct2/c_struct_template.rb
rex-2.0.12 lib/rex/struct2/c_struct_template.rb
rex-2.0.11 lib/rex/struct2/c_struct_template.rb
rex-struct2-0.1.2 lib/rex/struct2/c_struct_template.rb
rex-struct2-0.1.1 lib/rex/struct2/c_struct_template.rb
rex-struct2-0.1.0 lib/rex/struct2/c_struct_template.rb
rex-2.0.10 lib/rex/struct2/c_struct_template.rb
rex-2.0.9 lib/rex/struct2/c_struct_template.rb
rex-2.0.8 lib/rex/struct2/c_struct_template.rb
rex-2.0.7 lib/rex/struct2/c_struct_template.rb
rex-2.0.5 lib/rex/struct2/c_struct_template.rb
rex-2.0.4 lib/rex/struct2/c_struct_template.rb
dstruct-0.0.1 lib/rex/struct2/c_struct_template.rb
rex-2.0.3 lib/rex/struct2/c_struct_template.rb
librex-0.0.999 lib/rex/struct2/c_struct_template.rb
rex-2.0.2 lib/rex/struct2/c_struct_template.rb
librex-0.0.71 lib/rex/struct2/c_struct_template.rb