Class: Pwnlib::Constants::ConstantBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/pwnlib/constants/constants.rb

Overview

Small class for instance_eval loaded file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConstantBuilder

Returns a new instance of ConstantBuilder.



87
88
89
# File 'lib/pwnlib/constants/constants.rb', line 87

def initialize
  @tbl = {}
end

Instance Attribute Details

#tblObject (readonly)

Returns the value of attribute tbl.



85
86
87
# File 'lib/pwnlib/constants/constants.rb', line 85

def tbl
  @tbl
end

Instance Method Details

#const(sym, val) ⇒ Object



91
92
93
# File 'lib/pwnlib/constants/constants.rb', line 91

def const(sym, val)
  @tbl[sym.to_sym] = Constant.new(sym.to_s, val)
end