Class: CurrentList

Inherits:
Object
  • Object
show all
Includes:
ListParserUtils
Defined in:
lib/ribit/contentparser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ListParserUtils

#build_regex

Constructor Details

#initialize(listContainer, level) ⇒ CurrentList

Returns a new instance of CurrentList.



631
632
633
634
# File 'lib/ribit/contentparser.rb', line 631

def initialize( listContainer, level )
  @container = listContainer
  @level = level
end

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



628
629
630
# File 'lib/ribit/contentparser.rb', line 628

def container
  @container
end

#levelObject (readonly)

Returns the value of attribute level.



628
629
630
# File 'lib/ribit/contentparser.rb', line 628

def level
  @level
end

Instance Method Details

#get_number_of_leading_charsObject



642
643
644
# File 'lib/ribit/contentparser.rb', line 642

def get_number_of_leading_chars
  return @level * 2 + 1 + 2
end

#get_regexObject



647
648
649
# File 'lib/ribit/contentparser.rb', line 647

def get_regex
  return build_regex( @level )
end

#get_sibling_regexObject



637
638
639
# File 'lib/ribit/contentparser.rb', line 637

def get_sibling_regex
  return build_regex( @level + 1 )
end