Class: BinData::StringArgProcessor

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

Instance Method Summary collapse

Methods inherited from BaseArgProcessor

#extract_args, #separate_args

Instance Method Details

#sanitize_parameters!(obj_class, params) ⇒ Object



127
128
129
130
131
132
# File 'lib/bindata/string.rb', line 127

def sanitize_parameters!(obj_class, params)
  params.warn_replacement_parameter(:initial_length, :read_length)
  params.must_be_integer(:read_length, :length)
  params.rename_parameter(:pad_left, :pad_front)
  params.sanitize(:pad_byte) { |byte| sanitized_pad_byte(byte) }
end