shard-container 0.6.3 → 0.6.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/readme.md +47 -0
  3. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9867a0fbea83ab917865efd4bf310d8815b70733
4
- data.tar.gz: 66762eaa6bd11c92aeca702d5d73058a35cae93c
3
+ metadata.gz: 1fcb678b9d98e9b8b639314a1f45199a04c25219
4
+ data.tar.gz: b901198b01e4d704e1869f085f5a4343e130ba71
5
5
  SHA512:
6
- metadata.gz: bfd027caf8af4401b4b5f1d62e2feac2280176df7bdaed16d00e325eecbe76e094df3934af69af91feb53c0119121882bcfb89cf4d166e3de42cf16dc3204091
7
- data.tar.gz: ed1e38f8c785fcb38b9ca773766f32564f8c923a1e37a32fb2ec74cd923198cdfe4bacd0e1f997f335e42efe08c402bd4a5cc2f4ebfadf7364b39b29bbd963bc
6
+ metadata.gz: d0506b9f7370bdd1b4a367c18dc383a585bee258a97c41c50d0d04f82dbc88ea665d1a2c6b60aee7007a5c3c3eb7543a0e8c5a909e5068ed7269c7817ca7f5f3
7
+ data.tar.gz: 6f15acb2f6c60a1a4f143c114d72161a6d18be49a8ae02ec0fca4418d7ddb1a76ecda2fb6f01d20434f7dd65647eec7de9d1dc47de15cc3edbca6cb0c5b47b05
data/readme.md ADDED
@@ -0,0 +1,47 @@
1
+ # Shard
2
+
3
+ ## What is Shard?
4
+ > Shard is an intuitive container class that allows extended capabilities of Hashes and arrays, as well as extra methods for formatting and aliases.
5
+
6
+ ## Methods
7
+ > #### Initialization
8
+ > A shard's initial id parameter can be set to either a String, Symbol, or Fixnum.
9
+ > test1=Shard.new(:testShard)
10
+ > test2=Shard.new('testShard') #different id than the test1
11
+ > test3=Shard.new(3)
12
+ >
13
+ > #### Adding to a shard
14
+ > Adding to a shard can be done one of two ways.
15
+ > test=Shard.new(:test)
16
+ > test.add('foo',:bar,123)
17
+ > test.values<<['foo',:bar,123] #this can be cleaned up later
18
+ >
19
+ > #### Deleting shard elements
20
+ > Deleting from a shard is also easily done.
21
+ > test=Shard.new(:test) #initialize the shard
22
+ > test.add('foo',:bar,123) #add to the shard
23
+ >
24
+ > test.keyDelete('foo') #delete by key
25
+ > test.valDelete(':bar') #delete by value
26
+ > test.indexDelete(0) #delete by index, works with ranges by using 2 parameters
27
+ >
28
+ > #### Correction
29
+ > Shards also supply a few formatting methods.
30
+ > test=Shard.new(:test) #initialize the shard
31
+ > x.values<<[1,2,3] #add to the shard
32
+ > => [[1, 2, 3]]
33
+ > test.corr #converts the manually added array to a formatted struct
34
+ > => [#<struct key=1, val=2, util=3>]
35
+ >
36
+ > #### Pruning
37
+ > Pruning a shard's unique keys, values, or utilities is accomplished using the following aliases, or a raw `Shard.prune` method call using any combination of `:key`,`:val`, or `:util` as parameters.
38
+ > Shard.pruneKeys #prune by keys
39
+ > Shard.pruneVals #prune by values
40
+ > Shard.pruneUtils #prune by utilities
41
+ > Shard.pruneAll #prune by all parameters
42
+ >
43
+ > #### Cleaning shards
44
+ > Cleaning a shard using the `.clean` method returns an Array (nested, if more than one k/v/u set is selected) of readable sets with all elements in their original types.
45
+ > Shard.clean #cleans and returns entire shard
46
+ > Shard.clean(0) #cleans and returns shard element at index 0
47
+ > Shard.clean(0,2) #cleans and returns shard elements at indexes 0 to 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shard-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chitoge
@@ -15,15 +15,18 @@ description: An intuitive new container class for everyone from the everyday use
15
15
  email: RRTechFreelance@gmail.com
16
16
  executables: []
17
17
  extensions: []
18
- extra_rdoc_files: []
18
+ extra_rdoc_files:
19
+ - readme.md
19
20
  files:
20
21
  - lib/shard.rb
21
22
  - lib/shard/formatting.rb
23
+ - readme.md
22
24
  homepage: https://github.com/Nevermore-BD/Shard
23
25
  licenses:
24
26
  - MIT
25
27
  - IBM Public License
26
- metadata: {}
28
+ metadata:
29
+ homepage: https://github.com/Nevermore-BD/Shard
27
30
  post_install_message:
28
31
  rdoc_options: []
29
32
  require_paths: