Sha256: 99a081fabe950e4f8381319e12389ff552f4b9c8932e7e30ae55a75c9c6b253d
Contents?: true
Size: 560 Bytes
Versions: 6
Compression:
Stored size: 560 Bytes
Contents
# encoding: utf-8 module RuboCop module Cop # Common functionality for cops checking if and unless statements. module OnNormalIfUnless include IfNode def on_if(node) invoke_hook_for_normal_if_unless(node) end def on_unless(node) invoke_hook_for_normal_if_unless(node) end def invoke_hook_for_normal_if_unless(node) # We won't check modifier or ternary conditionals. return if modifier_if?(node) || ternary_op?(node) on_normal_if_unless(node) end end end end
Version data entries
6 entries across 6 versions & 2 rubygems