File: base.rb

package info (click to toggle)
ruby-prawn-icon 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,228 kB
  • sloc: ruby: 1,370; makefile: 5
file content (31 lines) | stat: -rw-r--r-- 665 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

# base.rb - Base configuration for Prawn::Icon.
#
# Copyright September 2016, Jesse Doyle. All rights reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.

require 'prawn'
require_relative 'errors'

module Prawn
  class Icon
    class << self
      attr_writer :configuration

      def configuration
        @configuration ||= Configuration.new
      end

      def configure
        yield(configuration)
      end
    end

    module Base
      # @deprecated Use {Prawn::Icon.configuration.font_directory} instead
      FONTDIR = Prawn::Icon.configuration.font_directory.to_s
    end
  end
end