Class: MatchResult
- Inherits:
-
Object
- Object
- MatchResult
- Defined in:
- lib/cirrocumulus/pattern_matching.rb
Instance Attribute Summary collapse
-
#matched_facts ⇒ Object
readonly
Returns the value of attribute matched_facts.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(rule) ⇒ MatchResult
constructor
A new instance of MatchResult.
Constructor Details
#initialize(rule) ⇒ MatchResult
Returns a new instance of MatchResult.
2 3 4 5 6 |
# File 'lib/cirrocumulus/pattern_matching.rb', line 2 def initialize(rule) @rule = rule @matched_facts = [] @parameters = nil end |
Instance Attribute Details
#matched_facts ⇒ Object (readonly)
Returns the value of attribute matched_facts.
9 10 11 |
# File 'lib/cirrocumulus/pattern_matching.rb', line 9 def matched_facts @matched_facts end |
#parameters ⇒ Object
Returns the value of attribute parameters.
10 11 12 |
# File 'lib/cirrocumulus/pattern_matching.rb', line 10 def parameters @parameters end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
8 9 10 |
# File 'lib/cirrocumulus/pattern_matching.rb', line 8 def rule @rule end |
Instance Method Details
#==(other) ⇒ Object
12 13 14 |
# File 'lib/cirrocumulus/pattern_matching.rb', line 12 def ==(other) rule == other.rule && matched_facts == other.matched_facts end |