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



68
69
70
71
72
73
# File 'lib/bindata/skip.rb', line 68

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