fresh_objects 1.0.0.pre.alpha → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +12 -3
- data/lib/fresh_objects/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3ab928e88280f1d6ad5c506b6c627ff17ebc27222bb9d5be6df1df6d4c4de1e
|
4
|
+
data.tar.gz: 9b2c9ec748b4c8ed4f88140364934a8bdb5076a10c12a0fe6fc7c0947d33fa1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76f21b691f90f178185f4d31a13ecf17ac17f408be56733d5b0ca86d9b509d256461a71157e8745bd5c1710bcf63621221cda6e1c4477a5d9e5f8d5ecd35a857
|
7
|
+
data.tar.gz: fec7810be16b09027eeae5c402ddd1bfa6cff692820502136dda78cf5be2f5e075b8d1222323a25a54b9623ef2ebbe16d89bb5c9dd8b6480a39b19e2d3b16c86
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -28,7 +28,7 @@ Say we have the following dataset:
|
|
28
28
|
objects = [
|
29
29
|
{
|
30
30
|
id: 1,
|
31
|
-
name: '
|
31
|
+
name: 'Clark Kent'
|
32
32
|
timestamp: '2019-01-02 12:00:00 UTC'
|
33
33
|
},
|
34
34
|
{
|
@@ -38,7 +38,7 @@ objects = [
|
|
38
38
|
},
|
39
39
|
{
|
40
40
|
id: 1,
|
41
|
-
name: '
|
41
|
+
name: 'John Doe'
|
42
42
|
timestamp: '2019-01-02 11:59:59 UTC'
|
43
43
|
}
|
44
44
|
]
|
@@ -68,7 +68,16 @@ Notes:
|
|
68
68
|
|
69
69
|
* You can change the object ID key by passing in the `id_key` into `FreshObjects#filter`.
|
70
70
|
* You can change the timestamp key by passing in the `timestamp_key` into `FreshObjects#filter`.
|
71
|
-
|
71
|
+
|
72
|
+
### The Resolver
|
73
|
+
|
74
|
+
A resolver is an object with a `get` method with the signature: `get(object, expression)` where object is the inputted object and expression is the key (or key-path of the value you want to retrieve.) By default, the Objectable is used. Objectable provides several benefits out-of-the-box since it:
|
75
|
+
|
76
|
+
* supports nested objects (using key-path dot notation)
|
77
|
+
* works with hashes and all other object types
|
78
|
+
* works with attributes and methods
|
79
|
+
|
80
|
+
Chances are the default resolver works. In case you need to enhance or change the resolution implementation you are free to pass in your own customization of Objectable or swap it for a who new implementation altogether. [See the Objectable repository for more information](https://github.com/bluemarblepayroll/objectable).
|
72
81
|
|
73
82
|
### Saving a Filter
|
74
83
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fresh_objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ruggio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: objectable
|
@@ -170,9 +170,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: 2.3.8
|
171
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
|
-
- - "
|
173
|
+
- - ">="
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version:
|
175
|
+
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubygems_version: 3.0.3
|
178
178
|
signing_key:
|