Sha256: 3380b0bfd9cdeedd51bf29b489f47e9ee2bdefba8fdaae7227b82e045a77ea96

Contents?: true

Size: 803 Bytes

Versions: 36

Compression:

Stored size: 803 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.nil?

        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

36 entries across 36 versions & 1 rubygems

Version Path
fontist-1.13.0 lib/fontist/manifest/install.rb
fontist-1.12.0 lib/fontist/manifest/install.rb
fontist-1.11.7 lib/fontist/manifest/install.rb
fontist-1.11.6 lib/fontist/manifest/install.rb
fontist-1.11.5 lib/fontist/manifest/install.rb
fontist-1.11.3 lib/fontist/manifest/install.rb
fontist-1.11.2 lib/fontist/manifest/install.rb
fontist-1.9.3 lib/fontist/manifest/install.rb
fontist-1.9.2 lib/fontist/manifest/install.rb
fontist-1.11.1 lib/fontist/manifest/install.rb
fontist-1.10.1 lib/fontist/manifest/install.rb
fontist-1.10.0 lib/fontist/manifest/install.rb
fontist-1.9.1 lib/fontist/manifest/install.rb
fontist-1.9.0 lib/fontist/manifest/install.rb
fontist-1.8.13 lib/fontist/manifest/install.rb
fontist-1.8.12 lib/fontist/manifest/install.rb