Sha256: e54238228658f5e5834d8bd99bc700c63db8786aa7227cc51d721638a381995f
Contents?: true
Size: 491 Bytes
Versions: 3
Compression:
Stored size: 491 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 end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems