Class: Property::Schema

Inherits:
Role
  • Object
show all
Includes:
SchemaModule
Defined in:
lib/property/schema.rb

Overview

A schema contains all the property definitions for a given class. If Role is a module, then schema is a Class.

Instance Method Summary collapse

Methods included from SchemaModule

#add_column, #columns, #has_role?, #include_role, #index_groups, #initialize_schema_module, #klass, #roles, #used_roles_in

Methods inherited from Role

new

Methods included from RoleModule

#column_names, #columns, #defined_columns, #defined_indices, #has_column?, #index, #inspect, #name, #property, #serialize, #used_in, #used_keys_in

Constructor Details

#initialize(name, opts = {}) ⇒ Schema

Initialize a new schema with a name and the klass linked to the schema.



8
9
10
11
# File 'lib/property/schema.rb', line 8

def initialize(name, opts = {})
  super
  initialize_schema_module(opts)
end