Class: Fontist::Info

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path) ⇒ Info

Returns a new instance of Info.



7
8
9
10
11
# File 'lib/fontist/repo.rb', line 7

def initialize(name, path)
  @name = name
   = (path)
  @formulas = build_formulas(path)
end

Instance Attribute Details

#formulasObject (readonly)

Returns the value of attribute formulas.



5
6
7
# File 'lib/fontist/repo.rb', line 5

def formulas
  @formulas
end

#metadataObject (readonly)

Returns the value of attribute metadata.



5
6
7
# File 'lib/fontist/repo.rb', line 5

def 
  
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/fontist/repo.rb', line 5

def name
  @name
end

Instance Method Details

#to_sObject



13
14
15
16
17
18
19
20
# File 'lib/fontist/repo.rb', line 13

def to_s
  "    Repository info for '\#{@name}':\n    \#{@metadata.map { |k, v| \"  \#{k}: \#{v}\" }.join(\"\\n\")}\n    Found \#{formulas.count} formulas:\n    \#{@formulas.map { |info| \"- \#{info.description} (\#{info.name})\" }.join(\"\\n\")}\n  MSG\nend\n".chomp