Class: Veto::EntityEvalCondition
- Defined in:
- lib/veto/conditions/entity_eval_condition.rb
Instance Method Summary collapse
-
#initialize(eval_string) ⇒ EntityEvalCondition
constructor
A new instance of EntityEvalCondition.
- #pass?(cco) ⇒ Boolean
Constructor Details
#initialize(eval_string) ⇒ EntityEvalCondition
Returns a new instance of EntityEvalCondition.
3 4 5 |
# File 'lib/veto/conditions/entity_eval_condition.rb', line 3 def initialize(eval_string) @eval_string = eval_string end |
Instance Method Details
#pass?(cco) ⇒ Boolean
7 8 9 |
# File 'lib/veto/conditions/entity_eval_condition.rb', line 7 def pass?(cco) !!cco.entity.instance_eval(@eval_string) end |