Class: MiddlemanToc::Validator
- Inherits:
-
Struct
- Object
- Struct
- MiddlemanToc::Validator
- Defined in:
- lib/middleman_toc/validator.rb
Constant Summary collapse
- INDENT =
' '
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
-
#pages ⇒ Object
Returns the value of attribute pages.
Instance Method Summary collapse
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node
4 5 6 |
# File 'lib/middleman_toc/validator.rb', line 4 def node @node end |
#pages ⇒ Object
Returns the value of attribute pages
4 5 6 |
# File 'lib/middleman_toc/validator.rb', line 4 def pages @pages end |
Instance Method Details
#validate! ⇒ Object
7 8 9 10 11 |
# File 'lib/middleman_toc/validator.rb', line 7 def validate! hrefs.each do |href| missing_page(href) unless exists?(href) end end |