Module: Property::Index

Defined in:
lib/property/index.rb

Overview

Property::Declaration module is used to declare property definitions in a Class. The module also manages property inheritence in sub-classes.

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Constant Summary collapse

KEY =
Property::Db.connection.quote_column_name('key')
FIELD_INDEX_REGEXP =
%r{\A\.(.*)\Z}

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/property/index.rb', line 9

def self.included(base)
  base.class_eval do
    extend  ClassMethods
    include InstanceMethods
    before_save :property_field_index
    after_save  :property_index
    after_destroy :property_index_destroy
  end
end