ClassMethods¶
Constants¶
Methods¶
def attribute!(name, options = {}) super(name, options) define_method("#{name}=") do |value| typecast_value = typecast_attribute(_attribute_typecaster(name), value) send("#{name}_will_change!") unless typecast_value == read_attribute(name) super(value) end end
def declared_property_manager @_declared_property_manager ||= DeclaredPropertyManager.new(self) end
def inherited(other) self.declared_property_manager.registered_properties.each_pair do |prop_key, prop_def| other.property(prop_key, prop_def.options) end super end
def undef_property(name) declared_property_manager.unregister(name) attribute_methods(name).each { |method| undef_method(method) } undef_constraint_or_index(name) end