Sha256: e725c48f0013ac2397992e89ad54bf91d3a757d9999abc17ff27ba3481da9cc3
Contents?: true
Size: 520 Bytes
Versions: 14
Compression:
Stored size: 520 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop class ClassAndModuleCamelCase < Cop ERROR_MESSAGE = 'Use CamelCase for classes and modules.' def inspect(file, source, tokens, sexp) [:class, :module].each do |keyword| each(keyword, sexp) do |s| if s[1][0] == :const_ref && s[1][1][0] == :@const && s[1][1][1] =~ /_/ add_offence(:convention, s[1][1][2].lineno, ERROR_MESSAGE) end end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems