class Fontist::Indexes::IndexFormula
Public Class Methods
new(path)
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 4 def initialize(path) @path = path end
Public Instance Methods
==(other)
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 20 def ==(other) to_s == other.to_s end
name()
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 8 def name normalized.sub(/\.yml$/, "") end
to_full()
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 16 def to_full Formula.new_from_file(full_path) end
to_s()
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 12 def to_s normalized end
Private Instance Methods
full_path()
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 31 def full_path Fontist.formulas_path.join(normalized).to_s end
normalized()
click to toggle source
# File lib/fontist/indexes/index_formula.rb, line 26 def normalized escaped = Regexp.escape(Fontist.formulas_path.to_s + "/") @path.sub(Regexp.new("^" + escaped), "") end