Class: BinData::SanitizedChoices
- Inherits:
-
SanitizedParameter
- Object
- SanitizedParameter
- BinData::SanitizedChoices
- Defined in:
- lib/bindata/sanitize.rb
Overview
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(sanitizer, choices) ⇒ SanitizedChoices
constructor
A new instance of SanitizedChoices.
Constructor Details
#initialize(sanitizer, choices) ⇒ SanitizedChoices
Returns a new instance of SanitizedChoices.
243 244 245 246 247 248 249 250 |
# File 'lib/bindata/sanitize.rb', line 243 def initialize(sanitizer, choices) @choices = {} choices.each_pair do |key, val| type, param = val prototype = sanitizer.create_sanitized_object_prototype(type, param) @choices[key] = prototype end end |
Instance Method Details
#[](key) ⇒ Object
252 253 254 |
# File 'lib/bindata/sanitize.rb', line 252 def [](key) @choices[key] end |