Class: Rules::Parameters::Constant
- Defined in:
- lib/rules/parameters/constant.rb
Constant Summary
Constants inherited from Parameter
Instance Attribute Summary collapse
-
#evaluation_method ⇒ Object
Returns the value of attribute evaluation_method.
Attributes inherited from Parameter
Instance Method Summary collapse
Methods inherited from Parameter
Constructor Details
This class inherits a constructor from Rules::Parameters::Parameter
Instance Attribute Details
#evaluation_method ⇒ Object
Returns the value of attribute evaluation_method.
5 6 7 |
# File 'lib/rules/parameters/constant.rb', line 5 def evaluation_method @evaluation_method end |
Instance Method Details
#evaluate(attributes = {}) ⇒ Object
7 8 9 10 |
# File 'lib/rules/parameters/constant.rb', line 7 def evaluate(attributes = {}) raise 'Unknown evaluation method' unless evaluation_method evaluation_method.call end |