Method: WebFont::LocalCache.save

Defined in:
lib/web_font/local_cache.rb

.save(font) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/web_font/local_cache.rb', line 11

def save(font)
  return nil unless cache_path

  filename = File.basename(font)
  path     = File.join(cache_path, filename)
  FileUtils.copy(font, path) unless font == path

  path
end