class Fontist::Info

Attributes

formulas[R]
metadata[R]
name[R]

Public Class Methods

new(name, path) click to toggle source
# File lib/fontist/repo.rb, line 7
def initialize(name, path)
  @name = name
  @metadata = build_metadata(path)
  @formulas = build_formulas(path)
end

Public Instance Methods

to_s() click to toggle source
# File lib/fontist/repo.rb, line 13
    def to_s
      <<~MSG.chomp
        Repository info for '#{@name}':
        #{@metadata.map { |k, v| "  #{k}: #{v}" }.join("\n")}
        Found #{formulas.count} formulas:
        #{@formulas.map { |info| "- #{info.description} (#{info.name})" }.join("\n")}
      MSG
    end