Class: BinData::Uint8ArrayArgProcessor
- Inherits:
-
BaseArgProcessor
- Object
- BaseArgProcessor
- BinData::Uint8ArrayArgProcessor
- Defined in:
- lib/bindata/uint8_array.rb
Instance Method Summary collapse
Methods inherited from BaseArgProcessor
Instance Method Details
#sanitize_parameters!(obj_class, params) ⇒ Object
:nodoc:
52 53 54 55 56 57 58 59 60 |
# File 'lib/bindata/uint8_array.rb', line 52 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 msg = "Parameter :read_until must have a value of :eof" params.sanitize(:read_until) { |val| raise ArgumentError, msg unless val == :eof } end |