class BinData::Choice

def instantiate_choice(selection)

def instantiate_choice(selection)
  prototype = get_parameter(:choices)[selection]
  if prototype.nil?
    msg = "selection '#{selection}' does not exist in :choices for #{debug_name}"
    raise IndexError, msg
  end
  prototype.instantiate(nil, self)
end