class Fontist::Resources::GoogleResource
Public Class Methods
new(resource, options = {})
click to toggle source
# File lib/fontist/resources/google_resource.rb, line 4 def initialize(resource, options = {}) @resource = resource @options = options end
Public Instance Methods
files(source_names) { |join(dir, basename)| ... }
click to toggle source
# File lib/fontist/resources/google_resource.rb, line 9 def files(source_names) cached_paths = download_fonts(source_names) cached_paths.map do |path| Dir.mktmpdir do |dir| FileUtils.cp(path, dir) yield File.join(dir, File.basename(path)) end end end