File: placeholder.rb

package info (click to toggle)
ruby-ttfunk 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,472 kB
  • sloc: ruby: 7,954; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 535 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
# frozen_string_literal: true

module TTFunk
  # Encoded String placeholder.
  #
  # @api private
  class Placeholder
    # Placeholder position in the cintaining Encoded String
    # @return [Integer]
    attr_accessor :position

    # Planceholder name
    # @return [Symbol]
    attr_reader :name

    # Length of the placeholder
    # @return [Integer]
    attr_reader :length

    # @param name [Symbol]
    # @param length [Integer]
    def initialize(name, length: 1)
      @name = name
      @length = length
    end
  end
end