Class: Fontist::FontInstaller

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

Instance Method Summary collapse

Constructor Details

#initialize(formula, font_name: nil, no_progress: false) ⇒ FontInstaller

Returns a new instance of FontInstaller.



8
9
10
11
12
# File 'lib/fontist/font_installer.rb', line 8

def initialize(formula, font_name: nil, no_progress: false)
  @formula = formula
  @font_name = font_name
  @no_progress = no_progress
end

Instance Method Details

#install(confirmation:) ⇒ Object



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

def install(confirmation:)
  raise_fontist_version_error unless supported_version?
  raise_licensing_error unless license_is_accepted?(confirmation)

  install_font
end