Sha256: 5e9c320c28548bd2b6f0a9168ccb900c309322ba93c57519e7b7aa91dbf99d02
Contents?: true
Size: 531 Bytes
Versions: 5
Compression:
Stored size: 531 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop module Lint # This cop checks for END blocks in method definitions. class EndInMethod < Cop MSG = 'END found in method definition. Use `at_exit` instead.' def on_def(node) check(node) end def on_defs(node) check(node) end private def check(node) on_node(:postexe, node) do |end_node| warning(end_node, :keyword) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems