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



85
86
87
88
89
90
91
92
# File 'lib/bindata/skip.rb', line 85

def sanitize_parameters!(obj_class, params)
  unless params.has_at_least_one_of?(:length, :to_abs_offset, :until_valid)
    raise ArgumentError,
      "#{obj_class} requires either :length, :to_abs_offset or :until_valid"
  end
  params.must_be_integer(:to_abs_offset, :length)
  params.sanitize_object_prototype(:until_valid)
end