Module: Dry

Defined in:
lib/dry/behaviour.rb,
lib/dry/behaviour/version.rb,
lib/dry/behaviour/cerberus.rb,
lib/dry/errors/not_matched.rb,
lib/dry/behaviour/black_tie.rb,
lib/dry/errors/not_protocol.rb,
lib/dry/errors/not_guardable.rb,
lib/dry/errors/not_implemented.rb,
lib/dry/errors/duplicate_definition.rb,
lib/dry/errors/malformed_definition.rb

Defined Under Namespace

Modules: Behaviour, BlackTie, Cerberus, Guards, Protocol

Constant Summary collapse

DEFINE_METHOD =

rubocop:disable Style/AsciiIdentifiers rubocop:disable Style/EmptyCaseCondition

lambda do |target, this, *args, **params, &λ|
  case
  when !args.empty? && !params.empty? then this.send(target, *args, **params, &λ)
  when !args.empty? then this.send(target, *args, &λ)
  when !params.empty? then this.send(target, **params, &λ)
  else this.send(target, &λ)
  end
end