Sha256: ab4e75f36202303ccee7d09233802e84d0ac0801465a1a64c9c587d1533ef8ee
Contents?: true
Size: 680 Bytes
Versions: 34
Compression:
Stored size: 680 Bytes
Contents
require 'ttfunk/reader' module TTFunk class Table include Reader attr_reader :file attr_reader :offset attr_reader :length def initialize(file) @file = file info = file.directory_info(tag) if info @offset = info[:offset] @length = info[:length] parse_from(@offset) { parse! } end end def exists? !@offset.nil? end def raw if exists? parse_from(offset) { io.read(length) } else nil end end def tag self.class.name.split(/::/).last.downcase end private def parse! # do nothing, by default end end end
Version data entries
34 entries across 34 versions & 10 rubygems