Class: Marko::Markup::Validator
- Defined in:
- lib/marko/markup/validator.rb
Instance Method Summary collapse
-
#call(tree) ⇒ Object
see Marko::Validator#call.
-
#initialize ⇒ Validator
constructor
A new instance of Validator.
Methods included from Pluggable
Constructor Details
#initialize ⇒ Validator
Returns a new instance of Validator.
9 10 11 12 13 14 15 |
# File 'lib/marko/markup/validator.rb', line 9 def initialize @inspectors = [] @inspectors << TheSameId.new @inspectors << LostParent.new @inspectors << LostIndex.new @inspectors << LostLink.new end |
Instance Method Details
#call(tree) ⇒ Object
see Marko::Validator#call
18 19 20 21 22 |
# File 'lib/marko/markup/validator.rb', line 18 def call(tree) [].tap{|errors| @inspectors.each{|spectr| errors.concat(spectr.(tree)) } } end |