Class: Serega::AttributeValueResolvers::DelegateResolver
- Inherits:
-
Object
- Object
- Serega::AttributeValueResolvers::DelegateResolver
- Defined in:
- lib/serega/attribute_value_resolvers/delegate.rb
Overview
Builds value resolver class for attributes with :delegate option
Class Method Summary collapse
-
.get(delegate_to, method_name, allow_nil) ⇒ Delegate, DelegateAllowNil
Creates resolver that delegates method call to another object.
Class Method Details
.get(delegate_to, method_name, allow_nil) ⇒ Delegate, DelegateAllowNil
Creates resolver that delegates method call to another object
20 21 22 |
# File 'lib/serega/attribute_value_resolvers/delegate.rb', line 20 def self.get(delegate_to, method_name, allow_nil) allow_nil ? DelegateAllowNil.new(delegate_to, method_name) : Delegate.new(delegate_to, method_name) end |