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



135
136
137
138
139
140
# File 'lib/bindata/string.rb', line 135

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