hash_math 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/README.md +3 -3
- data/lib/hash_math/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: f7a08cd91f3734e6acb87f0bc2904be2501b6aa0e8ca07ee8d90e5dd8fe8bd17
|
4
|
+
data.tar.gz: 065d4819ce940caa4e7f7a9fb5132a8643bccdc363985292aa0fed5b5e68bf77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9943d5a576a015330cbc315ae84b804f32ad2d24981c6e555e3fd4728000b2731ceedf40075a17de883cefce025e837f3b94e7224f3ac671232b98596d43e044
|
7
|
+
data.tar.gz: 4364b9f176d404f6e0538420c3786a36adb0af260e55ba735e3b4a8aaaa1884dc4e64fc1590b529883278e07c7cebf1a6694047c72b333e79e52df58b0854b03
|
data/README.md
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
Ruby's Hash data structure is ubiquitous and highly flexible. This library contains common Hash patterns widely used within our code-base:
|
6
6
|
|
7
7
|
* Matrix: build a hash up then expand into hash products
|
8
|
-
* Record: define a list of keys and base value to use as a blueprint for hashes
|
9
|
-
* Table: key-value pair two-dimensional array
|
8
|
+
* Record: define a list of keys and a base value (for each key) to use as a blueprint for hashes
|
9
|
+
* Table: key-value pair builder for constructing a two-dimensional array (rows by fields)
|
10
10
|
|
11
11
|
See examples for more information on each data structure.
|
12
12
|
|
@@ -147,7 +147,7 @@ Notes:
|
|
147
147
|
|
148
148
|
### Table: The Double Hash (Hash of Hashes)
|
149
149
|
|
150
|
-
HashMath::Table builds on top of HashMath::Record. It constructs a table data-structure using a key-value pair builder method: `#add(row_id, field_id,
|
150
|
+
HashMath::Table builds on top of HashMath::Record. It constructs a table data-structure using a key-value pair builder method: `#add(row_id, field_id, value)`. It ultimately outputs an array of Row objects where each Row object has a row_id and fields (field_id => value) hash. The value proposition here is you can iterate over a key-value pair and construct each row any way you wish.
|
151
151
|
|
152
152
|
Building on our Record example above:
|
153
153
|
|
data/lib/hash_math/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hash_math
|
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-09-
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-rspec
|
@@ -156,9 +156,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: 2.3.8
|
157
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
|
-
- - "
|
159
|
+
- - ">="
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version:
|
161
|
+
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubygems_version: 3.0.3
|
164
164
|
signing_key:
|