class BinData::SanitizedChoices
Public Class Methods
new(choices, hints)
click to toggle source
# File lib/bindata/sanitize.rb, line 133 def initialize(choices, hints) @choices = {} choices.each_pair do |key, val| if SanitizedParameter === val prototype = val else type, param = val prototype = SanitizedPrototype.new(type, param, hints) end if key == :default @choices.default = prototype else @choices[key] = prototype end end end
Public Instance Methods
[](key)
click to toggle source
# File lib/bindata/sanitize.rb, line 151 def [](key) @choices[key] end