Method: PDF::Reader::Buffer#token

Defined in:
lib/pdf/reader/buffer.rb

#tokenObject

return the next token from the source. Returns a string if a token is found, nil if there are no tokens left.



133
134
135
136
137
138
139
140
# File 'lib/pdf/reader/buffer.rb', line 133

def token
  reset_pos
  prepare_tokens if @tokens.size < 3
  merge_indirect_reference
  prepare_tokens if @tokens.size < 3

  @tokens.shift
end