Class: Yamlint::Rules::CommentRule
- Defined in:
- lib/yamlint/rules/base.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
defaults, desc, #fixable?, inherited, #initialize, rule_id
Constructor Details
This class inherits a constructor from Yamlint::Rules::Base
Instance Method Details
#check(context) ⇒ Object
88 89 90 91 92 93 94 95 |
# File 'lib/yamlint/rules/base.rb', line 88 def check(context) problems = [] context.comments.each do |comment| comment_problems = check_comment(comment, context) problems.concat(Array(comment_problems)) end problems end |
#check_comment(_comment, _context) ⇒ Object
97 98 99 |
# File 'lib/yamlint/rules/base.rb', line 97 def check_comment(_comment, _context) raise NotImplementedError, "#{self.class}#check_comment must be implemented" end |