Sha256: 96f629021eed78650e29c92bd5552fdd96fa636a5a1a8da8080067980e79664a

Contents?: true

Size: 793 Bytes

Versions: 43

Compression:

Stored size: 793 Bytes

Contents

#!/usr/bin/env ruby

# 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

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/struct2/c_struct_template.rb
librex-0.0.63 lib/rex/struct2/c_struct_template.rb
librex-0.0.54 lib/rex/struct2/c_struct_template.rb
librex-0.0.53 lib/rex/struct2/c_struct_template.rb
librex-0.0.52 lib/rex/struct2/c_struct_template.rb
librex-0.0.51 lib/rex/struct2/c_struct_template.rb
librex-0.0.50 lib/rex/struct2/c_struct_template.rb
librex-0.0.49 lib/rex/struct2/c_struct_template.rb
librex-0.0.48 lib/rex/struct2/c_struct_template.rb
librex-0.0.47 lib/rex/struct2/c_struct_template.rb
librex-0.0.46 lib/rex/struct2/c_struct_template.rb
librex-0.0.44 lib/rex/struct2/c_struct_template.rb
librex-0.0.43 lib/rex/struct2/c_struct_template.rb
librex-0.0.42 lib/rex/struct2/c_struct_template.rb
librex-0.0.41 lib/rex/struct2/c_struct_template.rb
librex-0.0.40 lib/rex/struct2/c_struct_template.rb
librex-0.0.39 lib/rex/struct2/c_struct_template.rb
librex-0.0.38 lib/rex/struct2/c_struct_template.rb
librex-0.0.37 lib/rex/struct2/c_struct_template.rb
librex-0.0.36 lib/rex/struct2/c_struct_template.rb