Class: BinData::ArrayArgProcessor
- Inherits:
-
BaseArgProcessor
- Object
- BaseArgProcessor
- BinData::ArrayArgProcessor
- Defined in:
- lib/bindata/array.rb
Instance Method Summary collapse
Methods inherited from BaseArgProcessor
Instance Method Details
#sanitize_parameters!(obj_class, params) ⇒ Object
:nodoc:
285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/bindata/array.rb', line 285 def sanitize_parameters!(obj_class, params) #:nodoc: # ensure one of :initial_length and :read_until exists unless params.has_at_least_one_of?(:initial_length, :read_until) params[:initial_length] = 0 end params.warn_replacement_parameter(:length, :initial_length) params.warn_replacement_parameter(:read_length, :initial_length) params.must_be_integer(:initial_length) params.merge!(obj_class.dsl_params) params.sanitize_object_prototype(:type) end |