Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added retrieve method to engine, and a unit-test for it

  • Loading branch information...
commit 94c1e2242b759447753f9d2accc95b67dabaa12e 1 parent e551595
jkutner authored
Showing with 5 additions and 0 deletions.
  1. +4 −0 lib/core/engine.rb
  2. +1 −0  tests/test.rb
View
4 lib/core/engine.rb
@@ -207,6 +207,10 @@ def modify(object,&block)
assert(object,&block)
end
+ def retrieve(c)
+ facts.select {|f| f.kind_of?(c)}
+ end
+
# This method adds a new rule to the system.
def assert_rule(rule)
@root = RootNode.new(@working_memory) if @root == nil
View
1  tests/test.rb
@@ -12,4 +12,5 @@
require 'test_duck_type'
require 'test_self_reference'
require 'test_re'
+require 'gets.rb'
Please sign in to comment.
Something went wrong with that request. Please try again.