Module: ActiveUUID::UUID::ClassMethods

Defined in:
lib/activeuuid/uuid.rb

Instance Method Summary collapse

Instance Method Details

#natural_key(*attributes) ⇒ Object



81
82
83
# File 'lib/activeuuid/uuid.rb', line 81

def natural_key(*attributes)
  @_activeuuid_natural_key_attributes = attributes
end

#natural_key_attributesObject



77
78
79
# File 'lib/activeuuid/uuid.rb', line 77

def natural_key_attributes
  @_activeuuid_natural_key_attributes
end

#uuids(*attributes) ⇒ Object



85
86
87
88
89
90
91
92
93
94
# File 'lib/activeuuid/uuid.rb', line 85

def uuids(*attributes)
 attributes.each do |attribute|
    serialize attribute.intern, ActiveUUID::UUIDSerializer.new
   #class_eval <<-eos
   #  # def #{@association_name}
   #  #   @_#{@association_name} ||= self.class.associations[:#{@association_name}].new_proxy(self)
   #  # end
   #eos
 end
end