class Fontist::Index
Public Class Methods
Source
# File lib/fontist/index.rb, line 33 def self.from_file(path) return new unless File.exist?(path) content = File.read(path) from_yaml(content) end
Source
# File lib/fontist/index.rb, line 44 def self.rebuild Fontist::Indexes::DefaultFamilyFontIndex.rebuild.to_file Fontist::Indexes::PreferredFamilyFontIndex.rebuild.to_file Fontist::Indexes::FilenameIndex.rebuild.to_file reset_cache end
Source
# File lib/fontist/index.rb, line 53 def self.reset_cache # Fontist::Indexes::DefaultFamilyFontIndex.reset_cache # Fontist::Indexes::PreferredFamilyFontIndex.reset_cache # Fontist::Indexes::FilenameIndex.reset_cache end
TODO: Uncomment all lines when each fixed
Public Instance Methods
Source
# File lib/fontist/index.rb, line 40 def to_file(path) File.write(path, to_yaml) end