Please sign in to comment.
Allow proc defaults with the Attributes API
This is a variant implementation of the changes proposed in #19914. Unlike that PR, the change in behavior is isolated in its own class. This is to prevent wonky behavior if a Proc is assigned outside of the default, and it is a natural place to place the behavior required by #19921 as well. Close #19914. [Sean Griffin & Kir Shatrov]
- Loading branch information
Showing with 36 additions and 1 deletion.
|@@ -0,0 +1,19 @@|
|class Attribute # :nodoc:|
|class UserProvidedDefault < FromUser|
|def initialize(name, value, type)|
|super(name, value, type)|