Comment Comment by radiospiel > how you might be able to get such a syntax to work in pure Ruby, but gave up because there is no built-in reflection API to get the parameter default valueswhat I have done successfully here https://github.com/radiospiel/simple-service/blob/master/lib... is to install a TracePoint which immediately throws, and then call the method. The tracepoint then receives the value of the default arguments.Not pretty, and I wouldn't run this in production critical parts of a system, but it works. parent radiospiel 11 months ago
what I have done successfully here https://github.com/radiospiel/simple-service/blob/master/lib... is to install a TracePoint which immediately throws, and then call the method. The tracepoint then receives the value of the default arguments.
Not pretty, and I wouldn't run this in production critical parts of a system, but it works.