Sha256: 6ab11570778ce39f4aa59c1a30ef3f6d232365591ac3d3928aca8a64d803ec5e
Contents?: true
Size: 671 Bytes
Versions: 16
Compression:
Stored size: 671 Bytes
Contents
# encoding: utf-8 module RuboCop module Cop module Style # This cop makes sure that all methods use the configured style, # snake_case or camelCase, for their names. Some special arrangements # have to be made for operator methods. class MethodName < Cop include ConfigurableNaming def on_def(node) name, = *node check_name(node, name, node.loc.name) end def on_defs(node) _object, name, = *node check_name(node, name, node.loc.name) end def message(style) format('Use %s for method names.', style) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems