In your example, without knowing more about the code, the self.attributes method uses a class variable ( @@attributes ), which means that you can add additional attributes to it at run time.
If your base_attributes hardcoded. I suspect you are seeing something like:
base_attributes.merge(attributes) , which can specify default values.
source share