-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hey! Thanks for the RubyConf talk. Just some real-life examples that I'd probably like to use the gem to, but I can't 😢
require 'kwurry/proc'
JSON.method(:parse).to_proc.kwurry.(symbolize_names: true).('{"a":1,"b":2}')
# ArgumentError (unknown keyword: [:symbolize_names])
# because...
JSON.method(:parse).parameters
# => [[:req, :source], [:opt, :opts]]
# The same way:
File.method(:read).to_proc.kwurry.(mode: 'rb')
# ArgumentError (unknown keyword: [:mode])
File.method(:read).parameters
# => [[:rest]] So it is cool to curry "real" kwargs but probably would be much cooler to be able also to curry "imitational" ones.
Thanks nevertheless!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels