thomas 0.1.0 → 0.1.1
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/lib/thomas.rb +2 -1
- metadata +3 -4
data/lib/thomas.rb
CHANGED
@@ -27,7 +27,8 @@ module Adocca
|
|
27
27
|
@amount = amount
|
28
28
|
end
|
29
29
|
def execute
|
30
|
-
instance = @model.
|
30
|
+
instance = @model.find_by_corpus_and_word(@corpus, @word)
|
31
|
+
instance = @model.create(:corpus => @corpus, :word => @word) unless instance
|
31
32
|
instance.update_attribute(:amount, (instance.amount || 0) + @amount)
|
32
33
|
end
|
33
34
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.8.11
|
3
3
|
specification_version: 1
|
4
4
|
name: thomas
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2006-11-
|
6
|
+
version: 0.1.1
|
7
|
+
date: 2006-11-16 00:00:00 +01:00
|
8
8
|
summary: Bayes classifier using memcached
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,7 +25,6 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
-
post_install_message:
|
29
28
|
authors:
|
30
29
|
- Adocca Entertainment AB
|
31
30
|
files:
|