Class: Kramdown::ANSI::Width::Token

Inherits:
Data
  • Object
show all
Defined in:
lib/kramdown/ansi/width.rb

Overview

A frozen data record for a single token in the truncate scan.

type is :esc (ANSI escape, zero display width) or :txt (visible character, display width from Unicode::DisplayWidth). value is the raw matched substring. length is the display width in terminal columns (0 for escapes).

Instance Attribute Summary collapse

Instance Attribute Details

#length ⇒ Object (readonly)

Returns the value of attribute length

Returns:

  • (Object) —

    the current value of length



106
107
108
# File 'lib/kramdown/ansi/width.rb', line 106

def length
  @length
end

#type ⇒ Object (readonly)

Returns the value of attribute type

Returns:

  • (Object) —

    the current value of type



106
107
108
# File 'lib/kramdown/ansi/width.rb', line 106

def type
  @type
end

#value ⇒ Object (readonly)

Returns the value of attribute value

Returns:

  • (Object) —

    the current value of value



106
107
108
# File 'lib/kramdown/ansi/width.rb', line 106

def value
  @value
end