class Fontist::Errors::MissingFontError

Public Class Methods

new(font, style = nil) click to toggle source
Calls superclass method Fontist::Errors::FontError::new
# File lib/fontist/errors.rb, line 58
def initialize(font, style = nil)
  name = prepare_name(font, style)
  msg = "#{name} font is missing, please run `fontist install '#{font}'` to download the font."

  super(msg, font, style)
end

Private Instance Methods

prepare_name(font, style) click to toggle source
# File lib/fontist/errors.rb, line 67
def prepare_name(font, style)
  names = []
  names << "'#{font}'"
  names << "'#{style}'" if style
  names.join(" ")
end