Class: Fontist::Indexes::IndexFormula

Inherits:
Object
  • Object
show all
Defined in:
lib/fontist/indexes/index_formula.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ IndexFormula

Returns a new instance of IndexFormula.



4
5
6
# File 'lib/fontist/indexes/index_formula.rb', line 4

def initialize(path)
  @path = path
end

Instance Method Details

#==(other) ⇒ Object



20
21
22
# File 'lib/fontist/indexes/index_formula.rb', line 20

def ==(other)
  to_s == other.to_s
end

#nameObject



8
9
10
# File 'lib/fontist/indexes/index_formula.rb', line 8

def name
  normalized.sub(/\.yml$/, "")
end

#to_fullObject



16
17
18
# File 'lib/fontist/indexes/index_formula.rb', line 16

def to_full
  Formula.new_from_file(full_path)
end

#to_sObject



12
13
14
# File 'lib/fontist/indexes/index_formula.rb', line 12

def to_s
  normalized
end