Module: PDF::Writer::OffsetReader

Defined in:
lib/pdf/writer/oreader.rb

Overview

– PDF::Writer for Ruby.

http://rubyforge.org/projects/ruby-pdf/
Copyright 2003 - 2005 Austin Ziegler.

Licensed under a MIT-style licence. See LICENCE in the main distribution
for full licensing information.

$Id$ ++

Instance Method Summary collapse

Instance Method Details

#offsetObject


19
20
21
# File 'lib/pdf/writer/oreader.rb', line 19

def offset
  @offset
end

#offset=(o) ⇒ Object


22
23
24
# File 'lib/pdf/writer/oreader.rb', line 22

def offset=(o)
  @offset = o || 0
end

#read_o(length = 1, offset = nil) ⇒ Object


12
13
14
15
16
17
18
# File 'lib/pdf/writer/oreader.rb', line 12

def read_o(length = 1, offset = nil)
  @offset ||= 0
  @offset = offset if offset
  ret = self[@offset, length]
  @offset += length
  ret
end