Sha256: ad119fcce0d867c139b68ae61c1e55b26cf2832208f6cc59c5c1ab01f509bba3
Contents?: true
Size: 508 Bytes
Versions: 3
Compression:
Stored size: 508 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop module Style # This cop checks for unwanted parentheses in parameterless method calls. class MethodCallParentheses < Cop MSG = 'Do not use parentheses for method calls with no arguments.' def on_send(node) _receiver, _method_name, *args = *node if args.empty? && node.loc.begin add_offence(:convention, node.loc.begin, MSG) end super end end end end end
Version data entries
3 entries across 3 versions & 2 rubygems