def add_attribute(name, type, metadata={})
      attr_reader name
      attributes << (metadata || {}).merge(:name => name.to_sym, :type => type.to_sym)
    end
def add_attribute(name, type, metadata={})
      attr_reader name
      attributes << (metadata || {}).merge(:name => name.to_sym, :type => type.to_sym)
    end
Attribute macros
 Defines an attribute

 @param [String] name The name of the attribute
 @param [Symbol] type The type of the attribute
 @param [Hash{Symbol => Object}] metadata The metadata for the attribute