The following example:
class Person
extend Attributable
attributes :name
end
class Employee < Person
attributes :salary
end
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.