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.
30 31 32 |
# File 'lib/serega/attribute_value_resolvers/keyword.rb', line 30 def initialize(keyword) @keyword = keyword end |
Instance Method Details
#call(object) ⇒ Object
Calls the keyword method on the object
40 41 42 |
# File 'lib/serega/attribute_value_resolvers/keyword.rb', line 40 def call(object) object.public_send(@keyword) end |