Sha256: aa2c73a28f990011f933548a8edd3dc5415e12538e55fc10c451b029ed4b894d
Contents?: true
Size: 586 Bytes
Versions: 28
Compression:
Stored size: 586 Bytes
Contents
require_relative "otfinfo/otfinfo_requirement" require_relative "text_helper" module Fontist module Import class OtfParser REQUIREMENTS = { otfinfo: Fontist::Import::Otfinfo::OtfinfoRequirement.new, }.freeze def initialize(path) @path = path end def call text = REQUIREMENTS[:otfinfo].call(@path) text.split("\n") .select { |x| x.include?(":") } .map { |x| x.split(":", 2) } .map { |x| x.map { |y| Fontist::Import::TextHelper.cleanup(y) } } .to_h end end end end
Version data entries
28 entries across 28 versions & 1 rubygems