class Fontist::Import::FormulaBuilder

Constants

FORMULA_ATTRIBUTES

Attributes

font_collection_files[W]
font_files[W]
license_text[W]
operations[W]
options[W]
resources[W]

Public Class Methods

new() click to toggle source
# File lib/fontist/import/formula_builder.rb, line 20
def initialize
  @options = {}
  @font_files = []
  @font_collection_files = []
end

Public Instance Methods

formula() click to toggle source
# File lib/fontist/import/formula_builder.rb, line 26
def formula
  formula_attributes.map { |name| [name, send(name)] }.to_h.compact
end
save() click to toggle source
# File lib/fontist/import/formula_builder.rb, line 30
def save
  path = vacant_path
  yaml = YAML.dump(Helpers::HashHelper.stringify_keys(formula))
  File.write(path, yaml)
  path
end