Class: BinData::SkipArgProcessor

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

Instance Method Summary collapse

Methods inherited from BaseArgProcessor

#extract_args, #separate_args

Instance Method Details

#sanitize_parameters!(obj_class, params) ⇒ Object



210
211
212
213
214
215
216
217
218
219
220
# File 'lib/bindata/skip.rb', line 210

def sanitize_parameters!(obj_class, params)
  params.merge!(obj_class.dsl_params)

  unless params.has_at_least_one_of?(:length, :to_abs_offset, :until_valid)
    raise ArgumentError,
          "#{obj_class} requires :length, :to_abs_offset or :until_valid"
  end

  params.must_be_integer(:to_abs_offset, :length)
  params.sanitize_object_prototype(:until_valid)
end