vendor/jruby/1.9/gems/reek-1.6.5/lib/reek/smells/long_yield_list.rb
#
# Checks the number of parameters in the given scope.
#
# @return [Array<SmellWarning>]
#
Checks the number of parameters in the given scope.
Checks the number of parameters in the given scope .
def examine_context(method_ctx)
        @max_allowed_params = value(MAX_ALLOWED_PARAMS_KEY,
                                    method_ctx,
                                    DEFAULT_MAX_ALLOWED_PARAMS)
        method_ctx.local_nodes(:yield).select do |yield_node|
          yield_node.args.length > @max_allowed_params
        end.map do |yield_node|
          count = yield_node.args.length
          SmellWarning.new self,
                           context: method_ctx.full_name,
                           lines: [yield_node.line],
                           message: "yields #{count} parameters",
                           parameters: { count: count }
        end
      end
def examine_context ( method_ctx ) @max_allowed_params = value ( MAX_ALLOWED_PARAMS_KEY , method_ctx , DEFAULT_MAX_ALLOWED_PARAMS ) method_ctx . local_nodes ( :yield ) . select do | yield_node | yield_node . args . length > @max_allowed_params end . map do | yield_node | count = yield_node . args . length SmellWarning . new self , context : method_ctx . full_name , lines : [ yield_node . line ] , message : "yields #{count} parameters" , parameters : { count : count } end end
Checks the number of parameters in the given scope.
Checks the number of parameters in the given scope .
None
Array<SmellWarning>
method_ctx