Class: Fontist::Import::GoogleImport

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

Constant Summary collapse

REPO_PATH =
Fontist.fontist_path.join("google", "fonts")
REPO_URL =
"https://github.com/google/fonts.git".freeze

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ GoogleImport

Returns a new instance of GoogleImport.



11
12
13
# File 'lib/fontist/import/google_import.rb', line 11

def initialize(options)
  @max_count = options[:max_count] || Google::DEFAULT_MAX_COUNT
end

Instance Method Details

#callObject



15
16
17
18
19
# File 'lib/fontist/import/google_import.rb', line 15

def call
  update_repo
  count = update_formulas
  rebuild_index if count.positive?
end