Class: CurrentList
- Inherits:
-
Object
- Object
- CurrentList
- Includes:
- ListParserUtils
- Defined in:
- lib/ribit/contentparser.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
Instance Method Summary collapse
- #get_number_of_leading_chars ⇒ Object
- #get_regex ⇒ Object
- #get_sibling_regex ⇒ Object
-
#initialize(listContainer, level) ⇒ CurrentList
constructor
A new instance of CurrentList.
Methods included from ListParserUtils
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
#container ⇒ Object (readonly)
Returns the value of attribute container.
628 629 630 |
# File 'lib/ribit/contentparser.rb', line 628 def container @container end |
#level ⇒ Object (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_chars ⇒ Object
642 643 644 |
# File 'lib/ribit/contentparser.rb', line 642 def get_number_of_leading_chars return @level * 2 + 1 + 2 end |
#get_regex ⇒ Object
647 648 649 |
# File 'lib/ribit/contentparser.rb', line 647 def get_regex return build_regex( @level ) end |
#get_sibling_regex ⇒ Object
637 638 639 |
# File 'lib/ribit/contentparser.rb', line 637 def get_sibling_regex return build_regex( @level + 1 ) end |