Sha256: 10e0a05b14539169e90a8d96167d2b3ffa360a6518fbc3e551ba2fc769749e04

Contents?: true

Size: 585 Bytes

Versions: 5

Compression:

Stored size: 585 Bytes

Contents

require_relative "locations"

module Fontist
  module Manifest
    class Install < Locations
      def initialize(manifest, confirmation: "no")
        @manifest = manifest
        @confirmation = confirmation
      end

      private

      def file_paths(font, style)
        paths = find_font_with_name(font, style)
        return paths unless paths["paths"].empty?

        install_font(font)

        find_font_with_name(font, style)
      end

      def install_font(font)
        Fontist::Font.install(font, force: true, confirmation: @confirmation)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fontist-1.8.5 lib/fontist/manifest/install.rb
fontist-1.8.4 lib/fontist/manifest/install.rb
fontist-1.8.3 lib/fontist/manifest/install.rb
fontist-1.8.2 lib/fontist/manifest/install.rb
fontist-1.8.1 lib/fontist/manifest/install.rb