Sha256: e0b9244dd2b1c21a2b734a66bc42a3ee4f231d932d52e7bb3e29761a50c86f16

Contents?: true

Size: 814 Bytes

Versions: 2

Compression:

Stored size: 814 Bytes

Contents

require_relative "locations"

module Fontist
  module Manifest
    class Install < Locations
      def initialize(manifest, confirmation: "no", hide_licenses: false, no_progress: false)
        super(manifest)
        @confirmation = confirmation
        @hide_licenses = hide_licenses
        @no_progress = no_progress
      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,
          hide_licenses: @hide_licenses,
          no_progress: @no_progress
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fontist-1.8.11 lib/fontist/manifest/install.rb
fontist-1.8.10 lib/fontist/manifest/install.rb