#_class_methods.erb class << self def attributes @attributes ||= HashWithIndifferentAccess.new(<%= attributes_with_defaults.map {|key,value| %Q[#{key}: #{value.inspect}]}.join(", ") %>).merge(super) end def types @types ||= ActiveMocker::HashProcess.new(<%= types_hash %>, method(:build_type)).merge(super) end def associations @associations ||= <%= associations %>.merge(super) end def associations_by_class @associations_by_class ||= <%= associations_by_class %>.merge(super) end def mocked_class <%= mocked_class.inspect %> end private :mocked_class def attribute_names @attribute_names ||= attributes.stringify_keys.keys end def primary_key <%= primary_key.name.inspect %> end def abstract_class? <%= abstract_class.inspect %> end def table_name <%= table_name.inspect %> || super end end