class TTFunk::SubTable
Attributes
file[R]
length[R]
table_offset[R]
Public Class Methods
new(file, offset, length = nil)
click to toggle source
# File lib/ttfunk/sub_table.rb, line 14 def initialize(file, offset, length = nil) @file = file @table_offset = offset @length = length parse_from(@table_offset) { parse! } end
Public Instance Methods
eot?()
click to toggle source
end of table
# File lib/ttfunk/sub_table.rb, line 22 def eot? # if length isn't set yet there's no way to know if we're at the end of # the table or not return false unless length io.pos > table_offset + length end
read(*args)
click to toggle source
Calls superclass method
TTFunk::Reader#read
# File lib/ttfunk/sub_table.rb, line 30 def read(*args) if eot? raise EOTError, 'attempted to read past the end of the table' end super end