module Fontist::Indexes::IndexMixin::ClassMethods
Public Instance Methods
Source
# File lib/fontist/indexes/index_mixin.rb, line 9 def from_file(file_path = self.path) Fontist.ui.debug("Index: #{file_path}") Fontist.formulas_repo_path_exists! rebuild unless File.exist?(file_path) file_content = File.read(file_path).strip if file_content.empty? raise Fontist::Errors::FontIndexCorrupted, "Index file is empty: #{file_path}" end from_yaml(file_content) end
Source
# File lib/fontist/indexes/index_mixin.rb, line 25 def rebuild # puts "Rebuilding index..." new.build end