evoc 3.5.1 → 3.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/evoc/rule.rb +13 -1
  3. data/lib/evoc/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf2a909713595259e442a0256da9377ea19da492
4
- data.tar.gz: daa7eb099b0b93f5320c8b13f014006068e0574c
3
+ metadata.gz: de896e4c41f41f2c7c235e34c365b77ed95bd060
4
+ data.tar.gz: 62bcb4d03197066b274f4ee25405fbb4793b5871
5
5
  SHA512:
6
- metadata.gz: c645753ac7fff69b5b6702b8763c0c18bab5886e138972b779d3f4670573d96bd57b933f2d8032845ca3eb28eb91033ea7e0a794a9c95ec6690e1101b1f6ed0a
7
- data.tar.gz: 58686fa4ebbc9b581141b1d612dfe6f18404fc04a8df66b25742c469fb48cd4bd16a0e81224d23b1c5b7c879a6d0b568b1d3d07491990a93810251fc7f574c6f
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
@@ -1,3 +1,3 @@
1
1
  module Evoc
2
- VERSION = "3.5.1"
2
+ VERSION = "3.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Rolfsnes