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) ⇒ SanitizedField
constructor
A new instance of SanitizedField.
- #instantiate(parent = nil) ⇒ Object
Constructor Details
#initialize(sanitizer, name, field_type, field_params) ⇒ SanitizedField
Returns a new instance of SanitizedField.
207 208 209 210 |
# File 'lib/bindata/sanitize.rb', line 207 def initialize(sanitizer, name, field_type, field_params) @name = name.to_s @prototype = sanitizer.create_sanitized_object_prototype(field_type, field_params) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
211 212 213 |
# File 'lib/bindata/sanitize.rb', line 211 def name @name end |
Instance Method Details
#instantiate(parent = nil) ⇒ Object
213 214 215 |
# File 'lib/bindata/sanitize.rb', line 213 def instantiate(parent = nil) @prototype.instantiate(parent) end |