Class: BinData::SanitizedField
- Inherits:
-
SanitizedParameter
- Object
- SanitizedParameter
- BinData::SanitizedField
- Defined in:
- lib/bindata/sanitize.rb
Overview
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(sanitizer, name, field_type, field_params, endian) ⇒ SanitizedField
constructor
A new instance of SanitizedField.
- #instantiate(parent = nil) ⇒ Object
Constructor Details
#initialize(sanitizer, name, field_type, field_params, endian) ⇒ SanitizedField
Returns a new instance of SanitizedField.
225 226 227 228 |
# File 'lib/bindata/sanitize.rb', line 225 def initialize(sanitizer, name, field_type, field_params, endian) @name = (name != nil and name != "") ? name.to_s : nil @prototype = sanitizer.create_sanitized_object_prototype(field_type, field_params, endian) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
229 230 231 |
# File 'lib/bindata/sanitize.rb', line 229 def name @name end |
Instance Method Details
#instantiate(parent = nil) ⇒ Object
231 232 233 |
# File 'lib/bindata/sanitize.rb', line 231 def instantiate(parent = nil) @prototype.instantiate(parent) end |