Class: BinData::ChoiceArgProcessor

Inherits:
BaseArgProcessor show all
Defined in:
lib/bindata/choice.rb

Instance Method Summary collapse

Methods inherited from BaseArgProcessor

#extract_args, #separate_args

Instance Method Details

#sanitize_parameters!(obj_class, params) ⇒ Object

:nodoc:



122
123
124
125
126
127
128
129
130
# File 'lib/bindata/choice.rb', line 122

def sanitize_parameters!(obj_class, params) #:nodoc:
  params.merge!(obj_class.dsl_params)

  params.sanitize_choices(:choices) do |choices|
    hash_choices = choices_as_hash(choices)
    ensure_valid_keys(hash_choices)
    hash_choices
  end
end