Module: Property

Defined in:
lib/property.rb,
lib/property/db.rb,
lib/property/base.rb,
lib/property/role.rb,
lib/property/dirty.rb,
lib/property/error.rb,
lib/property/index.rb,
lib/property/column.rb,
lib/property/schema.rb,
lib/property/version.rb,
lib/property/attribute.rb,
lib/property/properties.rb,
lib/property/declaration.rb,
lib/property/role_module.rb,
lib/property/stored_role.rb,
lib/property/schema_module.rb,
lib/property/stored_column.rb,
lib/property/stored_schema.rb,
lib/property/serialization/json.rb,
lib/property/serialization/yaml.rb,
lib/property/serialization/marshal.rb,
lib/property/redefined_method_error.rb,
lib/property/redefined_property_error.rb

Defined Under Namespace

Modules: Attribute, Base, Db, Declaration, Dirty, DirtyProperties, Index, RoleModule, SchemaModule, Serialization, StoredColumn, StoredRole, StoredSchema Classes: AttributeError, Column, DecodingError, Error, Properties, RedefinedMethodError, RedefinedPropertyError, Role, Schema

Constant Summary collapse

VERSION =
'2.3.6'

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/property.rb', line 19

def self.included(base)
  base.class_eval do
    include Attribute
    include Serialization::JSON
    include Declaration
    include Dirty
    include Index
  end
end

.validate_property_class(type) ⇒ Object



33
34
35
36
37
38
# File 'lib/property.rb', line 33

def self.validate_property_class(type)
  @@validators.each do |validator|
    return false unless validator.validate(type)
  end
  true
end

.validatorsObject



29
30
31
# File 'lib/property.rb', line 29

def self.validators
  @@validators ||= []
end