class Fontist::Indexes::FormulaKeyToPath
Public Instance Methods
Source
# File lib/fontist/indexes/formula_key_to_path.rb, line 17 def name formula_path.map { |p| normalized(p) } end
Source
# File lib/fontist/indexes/formula_key_to_path.rb, line 21 def normalized(path) return "" unless path escaped = Regexp.escape("#{Fontist.formulas_path}/") path.sub(Regexp.new("^#{escaped}"), "").sub(/\.yml$/, "").to_s end
Source
# File lib/fontist/indexes/formula_key_to_path.rb, line 13 def to_full formula_path.map { |p| Formula.from_file(full_path(p)) } end