You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defining Employee results in two calls to Attributable#add_instance_methods and hence Attributable's define_method logic is called twice (once with attributes = {name: nil} and once with attributes = {name: nil, salary: nil}).
It seems redundant to add these methods more than once.
The text was updated successfully, but these errors were encountered:
The following example:
Defining
Employee
results in two calls toAttributable#add_instance_methods
and hence Attributable'sdefine_method
logic is called twice (once withattributes = {name: nil}
and once withattributes = {name: nil, salary: nil}
).It seems redundant to add these methods more than once.
The text was updated successfully, but these errors were encountered: