ruleby 0.8.b4 → 0.8.b5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/core/nodes.rb +13 -4
  2. metadata +3 -3
@@ -697,10 +697,13 @@ module Ruleby
697
697
 
698
698
  def modify_left(context)
699
699
  @left_memory[context.fact.id] = [context]
700
- # you can't ref :collect patterns, so there should be anything to do on the right-memory
701
- #propagate_modify(context)
702
-
703
- # TODO something needs to happen here - but i'm not sure what!
700
+ @right_memory.values.each do |right_context|
701
+ mr = match_ref_nodes(context,right_context)
702
+ if (mr.is_match)
703
+ new_context = MatchContext.new context.fact, mr
704
+ propagate_modify(new_context)
705
+ end
706
+ end
704
707
  end
705
708
 
706
709
  def modify_right(context)
@@ -826,6 +829,12 @@ module Ruleby
826
829
  end
827
830
  end
828
831
 
832
+ def modify_left(context)
833
+ @left_memory[context.fact.id] = context
834
+
835
+ # TODO something needs to happen here - but i'm not sure what!
836
+ end
837
+
829
838
  # NOTE this returns a boolean, while the other classes return a MatchResult
830
839
  def match_ref_nodes(left_context,right_context)
831
840
  @ref_nodes.each do |ref_node|
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - b4
9
- version: 0.8.b4
8
+ - b5
9
+ version: 0.8.b5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joe Kutner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-12 00:00:00 -05:00
18
+ date: 2011-04-15 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21