Class: Fontico::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/fontico/railtie.rb

Class Method Summary collapse

Class Method Details

.local_dirs ⇒ Object

First-party SVGs are sources too, and editing one has to re-preprocess. Asked of the manifest, but never at the cost of the boot: an icons.yml too broken to parse must still come up, because the watcher is what picks up the fix.



50
51
52
53
54
55
56
57
58
# File 'lib/fontico/railtie.rb', line 50

def self.local_dirs
  path = begin
    Fontico.manifest.local_path
  rescue StandardError
    Manifest::LOCAL_PATH
  end
  dir = File.join(Fontico.root, path)
  File.directory?(dir) ? { dir => %w[svg] } : {}
end