Class: Serega::AttributeValueResolvers::Keyword
- Inherits:
-
Object
- Object
- Serega::AttributeValueResolvers::Keyword
- Defined in:
- lib/serega/attribute_value_resolvers/keyword.rb
Overview
Value resolver class for attributes with :keyword option
Instance Method Summary collapse
-
#call(object) ⇒ Object
Calls the keyword method on the object.
-
#initialize(keyword) ⇒ Keyword
constructor
A new instance of Keyword.
Constructor Details
#initialize(keyword) ⇒ Keyword
Returns a new instance of Keyword.
27 28 29 |
# File 'lib/serega/attribute_value_resolvers/keyword.rb', line 27 def initialize(keyword) @keyword = keyword end |
Instance Method Details
#call(object) ⇒ Object
Calls the keyword method on the object
37 38 39 |
# File 'lib/serega/attribute_value_resolvers/keyword.rb', line 37 def call(object) object.public_send(@keyword) end |