json-logic-rb 0.1.4 → 0.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e78d982fcb2d524f9cf465fe79b6248a4b0db63b188059e712ec2eaeac4f92fe
4
- data.tar.gz: d3088cd8e398155b9d94e5c9c34435b4af1fcd0c7ba71f6aedb7333802372218
3
+ metadata.gz: c8a44ea9eaa8d259e8122202d3db3608b8e6513f452f7daa0e1b53b96dbb3d09
4
+ data.tar.gz: 29cc6846d185232738182e1d0e677d852e9efd8446bc31613c563817dac7d221
5
5
  SHA512:
6
- metadata.gz: c960976bb1311c6ff7528464a62a7e655702bca7565c9594fa11a1b103c84f3beb045934c387adde643d9f21fbf4daeaf4c46f6e55a96e5866f95b5b86163da3
7
- data.tar.gz: f623b9be9b861890f73d7284050b8fd26debfc4d928495ed5ef406ccc0d4abbc7cec93ddf23485bcd199f0b85f7cec37cba0232ffa8589db429d80c28c5d6ae8
6
+ metadata.gz: 9bf0840e39f08f3e8c4a99a49196cace077ba17e005634df74349a58cf70b92e40e24907149fe00f9fb5b0c634ea0ad1f6deef222c0576b1f9224b3683162a5a
7
+ data.tar.gz: a96a9d99cb366dd0ff07a974da4dce757aa1836e4abb553c80ea9caadbd28c96be5080063bff5749949b7fdc7b74ecf2feee7bf898093121bedb1a0299b8dfb5
@@ -4,5 +4,9 @@ using JsonLogic::Semantics
4
4
 
5
5
  class JsonLogic::Operations::GT < JsonLogic::Operation
6
6
  def self.name = ">"
7
- def call((a,b), _data) = a > b
7
+
8
+ def call(values, _data)
9
+ return values[0] > values[1] if values.size == 2
10
+ values.each_cons(2).all? { |a,b| a > b }
11
+ end
8
12
  end
@@ -5,7 +5,8 @@ using JsonLogic::Semantics
5
5
  class JsonLogic::Operations::GTE < JsonLogic::Operation
6
6
  def self.name = ">="
7
7
 
8
- def call((a,b), _data)
9
- a >= b
8
+ def call(values, _data)
9
+ return values[0] >= values[1] if values.size == 2
10
+ values.each_cons(2).all? { |a,b| a >= b }
10
11
  end
11
12
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module JsonLogic; VERSION = '0.1.4'; end
3
+ module JsonLogic; VERSION = '0.1.5'; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-logic-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tavrel Kate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-03 00:00:00.000000000 Z
11
+ date: 2025-12-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby implementation of JsonLogic. JsonLogic rules are JSON trees. The
14
14
  engine walks that tree and returns a Ruby value. Ships with a compliance runner