Class: Controlist::Interceptor
- Inherits:
-
Object
- Object
- Controlist::Interceptor
- Defined in:
- lib/controlist/interceptor.rb
Constant Summary collapse
- PROXY_CLASSES =
{}
Class Method Summary collapse
-
.build_proxy(target) ⇒ Object
used by hook_attribute.
- .hook ⇒ Object
Class Method Details
.build_proxy(target) ⇒ Object
used by hook_attribute
16 17 18 19 20 |
# File 'lib/controlist/interceptor.rb', line 16 def build_proxy(target) klass = target.class proxy_class = (PROXY_CLASSES[klass] ||= create_value_object_proxy_class klass) proxy_class.new target end |
.hook ⇒ Object
9 10 11 12 13 |
# File 'lib/controlist/interceptor.rb', line 9 def hook hook_read hook_persistence hook_attribute end |