Class: Checken::RuleExecution
- Inherits:
-
Object
- Object
- Checken::RuleExecution
- Defined in:
- lib/checken/rule_execution.rb
Instance Attribute Summary collapse
-
#memo ⇒ Object
readonly
Returns the value of attribute memo.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(rule, user, object = nil) ⇒ RuleExecution
constructor
A new instance of RuleExecution.
- #satisfied? ⇒ Boolean
Constructor Details
#initialize(rule, user, object = nil) ⇒ RuleExecution
Returns a new instance of RuleExecution.
9 10 11 12 13 14 |
# File 'lib/checken/rule_execution.rb', line 9 def initialize(rule, user, object = nil) @rule = rule @user = user @object = object @memo = {} end |
Instance Attribute Details
#memo ⇒ Object (readonly)
Returns the value of attribute memo.
7 8 9 |
# File 'lib/checken/rule_execution.rb', line 7 def memo @memo end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/checken/rule_execution.rb', line 6 def object @object end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
4 5 6 |
# File 'lib/checken/rule_execution.rb', line 4 def rule @rule end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/checken/rule_execution.rb', line 5 def user @user end |
Instance Method Details
#satisfied? ⇒ Boolean
16 17 18 |
# File 'lib/checken/rule_execution.rb', line 16 def satisfied? @rule.satisfied?(self) end |