Module: PropertySets::Delegator
- Defined in:
- lib/property_sets/delegator.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
methods for moving what was once a literal column on to a property_set table.
Class Method Details
.included(base) ⇒ Object
methods for moving what was once a literal column on to a property_set table.
delegates read, write and query methods to the property record or the property default
Examples
# Migrate :is_open to the :settings property set, and rename it :open,
# and migrate :same to property set :same
include PropertySets::Delegator
delegate_to_property_set :settings, :is_open => :open, :same => :same
15 16 17 |
# File 'lib/property_sets/delegator.rb', line 15 def self.included(base) base.extend(ClassMethods) end |