lib/rubocop/cop/cop.rb in rubocop-0.6.0 vs lib/rubocop/cop/cop.rb in rubocop-0.6.1

- old
+ new

@@ -54,11 +54,16 @@ !@offences.empty? end def add_offence(severity, line_number, message) unless @disabled_lines && @disabled_lines.include?(line_number) + message = $options[:debug] ? "#{name}: #{message}" : message @offences << Offence.new(severity, line_number, message) end + end + + def name + self.class.to_s.split('::')[-1] end private def each_parent_of(sym, sexp)