lib/bindata/sanitize.rb
# Executes the given block with +endian+ set as the current endian.
Executes the given block with +endian+ set as the current endian.
Executes the given block with + endian + set as the current endian .
def with_endian(endian, &block)
      if endian != nil
        saved_endian = @endian
        @endian = endian
        yield
        @endian = saved_endian
      else
        yield
      end
    end
def with_endian ( endian , & block ) if endian != nil saved_endian = @endian @endian = endian yield @endian = saved_endian else yield end end
Executes the given block with +endian+ set as the current endian.
Executes the given block with + endian + set as the current endian .
endian
<not_specific>
block
<not_specific>