Class: BinData::SkipArgProcessor
Instance Method Summary
collapse
#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
|