Class: Rubocop::Cop::AsciiComments
- Defined in:
- lib/rubocop/cop/ascii_comments.rb
Constant Summary collapse
- MSG =
'Use only ascii symbols in comments.'
Instance Attribute Summary
Attributes inherited from Cop
#debug, #disabled_lines, #offences
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, cop_name, #has_report?, #ignore_node, inherited, #initialize, #inspect, #name
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#on_comment(c) ⇒ Object
8 9 10 |
# File 'lib/rubocop/cop/ascii_comments.rb', line 8 def on_comment(c) add_offence(:convention, c.loc.line, MSG) if c.text =~ /[^\x00-\x7f]/ end |