Class: BinData::SanitizedPrototype
- Inherits:
-
SanitizedParameter
- Object
- SanitizedParameter
- BinData::SanitizedPrototype
- Defined in:
- lib/bindata/sanitize.rb
Instance Method Summary collapse
-
#initialize(sanitizer, obj_type, obj_params, endian = nil) ⇒ SanitizedPrototype
constructor
A new instance of SanitizedPrototype.
- #instantiate(parent = nil) ⇒ Object
Constructor Details
#initialize(sanitizer, obj_type, obj_params, endian = nil) ⇒ SanitizedPrototype
Returns a new instance of SanitizedPrototype.
193 194 195 196 197 198 |
# File 'lib/bindata/sanitize.rb', line 193 def initialize(sanitizer, obj_type, obj_params, endian = nil) sanitizer.with_endian(endian) do @obj_class = sanitizer.lookup_class(obj_type) @obj_params = sanitizer.create_sanitized_params(obj_params, @obj_class) end end |
Instance Method Details
#instantiate(parent = nil) ⇒ Object
200 201 202 |
# File 'lib/bindata/sanitize.rb', line 200 def instantiate(parent = nil) @obj_class.new(@obj_params, parent) end |