hash-json-path 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/{hash_json_path.rb → hash-json-path.rb} +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3047615d11da1debef5b36bf0f43aab70d54d7b3d7a31e3f870625e644058d27
|
4
|
+
data.tar.gz: c645fb0e6ae2fd43cc070e3149353dd1b80961e6505cf257c4e9f3f6b0e0b3f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 434e6ab2b2b7238b5444647b70609ba1559e6e59ea463a236762a4caba01dc1d909d7b14f116f14ad3e65660b4ada276bb78fcdabf54f45527d4d28970e897de
|
7
|
+
data.tar.gz: d6c6bfc6e7723f864b27922557477cf1ecf1eb1800251d7ab949c235db54d2905c1d6d4386018956a6dd37aaaeadf93fb1521d7cb1a1e6ca79d94bf760e097e1
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class HashJsonPath
|
2
|
-
|
2
|
+
SEPARATOR_REGEX = /[^\[|^\]|^\.]+/ # e.g. local_results[0][1] => ["local_results", "0", "1"]
|
3
3
|
|
4
4
|
def self.on(hash)
|
5
5
|
new(hash)
|
6
6
|
end
|
7
7
|
|
8
|
-
def initialize(hash, separator_regex =
|
8
|
+
def initialize(hash, separator_regex = SEPARATOR_REGEX)
|
9
9
|
@hash = hash
|
10
10
|
@separator_regex = separator_regex
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hash-json-path
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terry Tan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: HashJsonPath is a simple gem to access hash and set hash value using
|
14
14
|
json path.
|
@@ -18,7 +18,7 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- lib/
|
21
|
+
- lib/hash-json-path.rb
|
22
22
|
homepage: https://github.com/serpapi/hash-json-path
|
23
23
|
licenses:
|
24
24
|
- MIT
|