Files

Class/Module Index [+]

Quicksearch

BinData::CheckOrAdjustOffsetPlugin

Parameters

Parameters may be provided at initialisation to control the behaviour of an object. These parameters are:

:check_offset

Raise an error if the current IO offset doesn’t meet this criteria. A boolean return indicates success or failure. Any other return is compared to the current offset. The variable offset is made available to any lambda assigned to this parameter. This parameter is only checked before reading.

:adjust_offset

Ensures that the current IO offset is at this position before reading. This is like :check_offset, except that it will adjust the IO offset instead of raising an error.

Public Instance Methods

initialize_shared_instance() click to toggle source
# File lib/bindata/offset.rb, line 25
def initialize_shared_instance
  extend CheckOffsetMixin  if has_parameter?(:check_offset)
  extend AdjustOffsetMixin if has_parameter?(:adjust_offset)
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.