Class: MarkupStyleRender::TagChar

Inherits:
TextChar
  • Object
show all
Defined in:
lib/Parsers/MarkupStyleRender.rb

Instance Attribute Summary collapse

Attributes inherited from TextChar

#chars, #type

Instance Method Summary collapse

Constructor Details

#initialize(sort, startIndex, endIndex, startChars, endChars) ⇒ TagChar

NOTE: ‘endIndex` is decremented by 1 here so it points at the *last covered* index rather than the half-open end. The walker checks `tag.endIndex == index` after emitting char at `index`.



43
44
45
46
47
48
49
# File 'lib/Parsers/MarkupStyleRender.rb', line 43

def initialize(sort, startIndex, endIndex, startChars, endChars)
    @sort = sort
    @startIndex = startIndex
    @endIndex = endIndex - 1
    @startChars = TextChar.new(startChars.chars, 'TagStart')
    @endChars = TextChar.new(endChars.chars, 'TagEnd')
end

Instance Attribute Details

#endCharsObject

Returns the value of attribute endChars.



39
40
41
# File 'lib/Parsers/MarkupStyleRender.rb', line 39

def endChars
  @endChars
end

#endIndexObject

Returns the value of attribute endIndex.



39
40
41
# File 'lib/Parsers/MarkupStyleRender.rb', line 39

def endIndex
  @endIndex
end

#sortObject

Returns the value of attribute sort.



39
40
41
# File 'lib/Parsers/MarkupStyleRender.rb', line 39

def sort
  @sort
end

#startCharsObject

Returns the value of attribute startChars.



39
40
41
# File 'lib/Parsers/MarkupStyleRender.rb', line 39

def startChars
  @startChars
end

#startIndexObject

Returns the value of attribute startIndex.



39
40
41
# File 'lib/Parsers/MarkupStyleRender.rb', line 39

def startIndex
  @startIndex
end