Class: Fontist::Import::Google::CreateGoogleFormula

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

Constant Summary collapse

REPO_PATH =
Fontist.fontist_path.join("google", "fonts")
POSSIBLE_LICENSE_FILES =
["LICENSE.txt",
"LICENCE.txt",
"OFL.txt",
"UFL.txt"].freeze

Instance Method Summary collapse

Constructor Details

#initialize(item, options = {}) ⇒ CreateGoogleFormula

Returns a new instance of CreateGoogleFormula.



15
16
17
18
# File 'lib/fontist/import/google/create_google_formula.rb', line 15

def initialize(item, options = {})
  @item = item
  @options = options
end

Instance Method Details

#callObject



20
21
22
23
24
25
26
27
# File 'lib/fontist/import/google/create_google_formula.rb', line 20

def call
  builder = FormulaBuilder.new
  builder.options = options
  builder.resources = resources
  builder.font_files = font_files
  builder.license_text = license_text
  builder.save
end