Class: Juli::Visitor::Html::Helper::Contents::ChapterChecker
- Inherits:
-
Absyn::Visitor
- Object
- Absyn::Visitor
- Juli::Visitor::Html::Helper::Contents::ChapterChecker
- Defined in:
- lib/juli/visitor/html/helper/contents.rb
Overview
Check if chapter exists or not
Instance Attribute Summary collapse
-
#chapter_exists ⇒ Object
Returns the value of attribute chapter_exists.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ChapterChecker
constructor
A new instance of ChapterChecker.
- #visit_chapter(n) ⇒ Object
Methods inherited from Absyn::Visitor
#run_bulk, #run_file, #visit_array, #visit_compact_dictionary_list, #visit_compact_dictionary_list_item, #visit_dictionary_list, #visit_dictionary_list_item, #visit_node, #visit_ordered_list, #visit_str, #visit_unordered_list, #visit_verbatim
Constructor Details
#initialize(opts = {}) ⇒ ChapterChecker
8 9 10 11 |
# File 'lib/juli/visitor/html/helper/contents.rb', line 8 def initialize(opts = {}) @chapter_exists = false super end |
Instance Attribute Details
#chapter_exists ⇒ Object
Returns the value of attribute chapter_exists.
6 7 8 |
# File 'lib/juli/visitor/html/helper/contents.rb', line 6 def chapter_exists @chapter_exists end |
Instance Method Details
#visit_chapter(n) ⇒ Object
13 14 15 |
# File 'lib/juli/visitor/html/helper/contents.rb', line 13 def visit_chapter(n) @chapter_exists = true end |