cirrocumulus 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
data/cirrocumulus.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cirrocumulus}
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Anton Kosyakin"]
12
- s.date = %q{2011-10-19}
12
+ s.date = %q{2011-10-20}
13
13
  s.description = %q{Engine for building your own agents, providing you base functionality for loading ontologies, communicating with other agents and parsing FIPA-ACL messages}
14
14
  s.email = %q{deil@mneko.net}
15
15
  s.extra_rdoc_files = [
@@ -23,9 +23,11 @@ module RuleEngine
23
23
  end
24
24
 
25
25
  def assert(fact, silent = false)
26
+ @facts = [] if @facts.nil?
27
+ return if @facts.include? fact
28
+
26
29
  log "assert: #{fact.inspect}"
27
30
 
28
- @facts = [] if @facts.nil?
29
31
  @facts << fact
30
32
  process() if !silent
31
33
  end
@@ -40,6 +42,11 @@ module RuleEngine
40
42
  end
41
43
  end
42
44
 
45
+ def query(fact)
46
+ @facts = [] if @facts.nil?
47
+ return @facts.include? fact
48
+ end
49
+
43
50
  def execute()
44
51
  process()
45
52
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cirrocumulus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 3
10
+ version: 0.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anton Kosyakin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-19 00:00:00 +04:00
18
+ date: 2011-10-20 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency