evoc 3.5.1 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evoc/rule.rb +13 -1
- data/lib/evoc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de896e4c41f41f2c7c235e34c365b77ed95bd060
|
4
|
+
data.tar.gz: 62bcb4d03197066b274f4ee25405fbb4793b5871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceed8a9223dda76ddfed1137eae2fbc30b3ae89c655e0314cc11fdac8e8d1633fb7619aa37a55db66bd1a16a5fc5af54c357f2f89f7f7e11139e1209b379b124
|
7
|
+
data.tar.gz: 6def5400d086425dd656ad74fc09c5e1fad81256f7c92ffd5f46c8e4f4cbd42f00a9745fe0cf3bba6dab9a900a641c91b839376fd691ac8ef5904b64ce1862fa
|
data/lib/evoc/rule.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Evoc
|
2
2
|
class Rule
|
3
3
|
include InterestingnessMeasures, Logging, Comparable
|
4
|
-
attr_accessor :lhs, :rhs, :name, :tx_store
|
4
|
+
attr_accessor :lhs, :rhs, :human_lhs, :human_rhs, :name, :tx_store
|
5
5
|
|
6
6
|
def initialize(lhs:,rhs:,tx_store: nil,**measures)
|
7
7
|
self.lhs = lhs.is_a?(Array) ? lhs.sort : [lhs]
|
@@ -21,6 +21,18 @@ module Evoc
|
|
21
21
|
name
|
22
22
|
end
|
23
23
|
|
24
|
+
def human_lhs
|
25
|
+
if !self.tx_store.nil? & self.lhs.all? {|i| i.is_a?(Numeric)}
|
26
|
+
self.lhs.map{|i| self.tx_store.int_2_name[i]}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def human_rhs
|
31
|
+
if !self.tx_store.nil? & self.rhs.all? {|i| i.is_a?(Numeric)}
|
32
|
+
self.rhs.map{|i| self.tx_store.int_2_name[i]}
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
def lhs=input
|
25
37
|
input.is_a?(Array) ? @lhs = input : @lhs = [input]
|
26
38
|
end
|
data/lib/evoc/version.rb
CHANGED