This cop checks the length of lines in the source code. The maximum length is configurable.
# File lib/rubocop/cop/style/line_length.rb, line 12 def investigate(processed_source) processed_source.lines.each_with_index do |line, index| next unless line.length > max message = format(MSG, line.length, max) add_offense(nil, source_range(processed_source.buffer, processed_source[0...index], max, line.length - max), message) do self.max = line.length end end end
Generated with the Darkfish Rdoc Generator 2.