File list.rb
has 323 lines of code (exceeds 250 allowed). Consider refactoring.
require_relative 'internal/curried_method'
require_relative 'internal/dispatchable'
require_relative 'internal/transducers'
module Ramda
Method curried_method_body
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
def curried_method_body(name, arity, &block)
Ramda::Internal::FunctionWithArity.call(arity) do |*args|
begin
if args.index(Ramda.__)
replace_placeholder(args, &block).curry
Method __make_curry_proc__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
def __make_curry_proc__(proc, passed, arity)
is_lambda = proc.lambda?
passed.freeze
__send__((is_lambda ? :lambda : :proc)) do |*argv, &passed_proc|
Method dispatchable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def dispatchable(method_names, described_types, xf = nil, &fn)
method_names = Array(method_names)
FunctionWithArity.call(fn.arity) do |*args, xs|
case xs
Method dispatchable1
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def dispatchable1(method_names, described_types, xf = nil, &fn)
method_names = Array(method_names)
FunctionWithArity.call(fn.arity) do |xs|
case xs