Class: Iconly::Project::FontGenerator
- Inherits:
-
Object
- Object
- Iconly::Project::FontGenerator
- Includes:
- FileUtils::Verbose
- Defined in:
- app/models/iconly/project/font_generator.rb
Constant Summary collapse
- FONT_NAME =
'iconly'.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(vectors_path, output_path, font_name = nil) ⇒ FontGenerator
constructor
A new instance of FontGenerator.
Constructor Details
#initialize(vectors_path, output_path, font_name = nil) ⇒ FontGenerator
Returns a new instance of FontGenerator.
8 9 10 11 12 |
# File 'app/models/iconly/project/font_generator.rb', line 8 def initialize(vectors_path, output_path, font_name = nil) @vectors_path = vectors_path @output_path = output_path @font_name = font_name || FONT_NAME end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/iconly/project/font_generator.rb', line 14 def call input = { vectors: @vectors_path, templates: templates_path } = { debug: Rails.env.development?, input: input, templates: %w(iconly.css), font_name: @font_name, css_selector: ".#{@font_name}-{{glyph}}", no_hash: true, verbose: true, manifest: manifest_path, output: { fonts: output_fonts_path, css: @output_path } } run_generators end |