Class: TTFunk::Placeholder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ttfunk/placeholder.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Encoded String placeholder.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, length: 1) ⇒ Placeholder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Placeholder.

Parameters:

  • name (Symbol)
  • length (Integer) (defaults to: 1)


22
23
24
25
# File 'lib/ttfunk/placeholder.rb', line 22

def initialize(name, length: 1)
  @name = name
  @length = length
end

Instance Attribute Details

#lengthInteger (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Length of the placeholder

Returns:

  • (Integer)


18
19
20
# File 'lib/ttfunk/placeholder.rb', line 18

def length
  @length
end

#nameSymbol (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Planceholder name

Returns:

  • (Symbol)


14
15
16
# File 'lib/ttfunk/placeholder.rb', line 14

def name
  @name
end

#positionInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Placeholder position in the cintaining Encoded String

Returns:

  • (Integer)


10
11
12
# File 'lib/ttfunk/placeholder.rb', line 10

def position
  @position
end