ui/data/RD dynamic ruby/model/src/reek/smell_detectors/module_initialize.rb
def sniff(ctx)
        ctx.local_nodes(:def) do |node|
          if node.name == :initialize
            return smell_warning(
              context: ctx,
              lines:   [ctx.exp.line],
              message: 'has initialize method')
          end
        end
        []
      end
#
# Checks whether module has method 'initialize'.
#
# @return [Array<SmellWarning>]
#
# :reek:FeatureEnvy
Checks whether module has method 'initialize'.
Checks whether module has method ' initialize ' .
def sniff(ctx)
        ctx.local_nodes(:def) do |node|
          if node.name == :initialize
            return smell_warning(
              context: ctx,
              lines:   [ctx.exp.line],
              message: 'has initialize method')
          end
        end
        []
      end
def sniff ( ctx ) ctx . local_nodes ( :def ) do | node | if node . name == :initialize return smell_warning ( context : ctx , lines : [ ctx . exp . line ] , message : 'has initialize method' ) end end [ ] end
Checks whether module has method 'initialize'.
Checks whether module has method ' initialize ' .
None
Array<SmellWarning>
ctx