Describe the bug
ArgumentError:
missing keyword: :items
# ./app/services/elements/save.rb:11:in `block in call'
# */gems/ruby-3.1.3/gems/dry-monads-1.6.0/lib/dry/monads/right_biased.rb:52:in `bind'
# ./app/services/elements/save.rb:11:in `call'
To Reproduce
class GetDetails
include Dry::Monads::Result::Mixin
def call(element)
elements = [element]
elements_count = elements.count
Success(elements:, elements_count:)
end
end
GetDetails.new.call(1).bind do |elements:, **_|
p elements
end
Expected behavior
bind has an elements variable
My environment
- Affects my production application: NO
- Ruby version: 3.1.3
- OS: Ubuntu 22.04.1