hashlib 0.0.1 → 0.0.2

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 (1) hide show
  1. metadata +4 -20
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,25 +11,9 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2013-03-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! "Hashlib: Utility methods for Ruby Hashes\n========================================\n\nHashlib
15
- extends the base Ruby Hash class with new methods that offer useful functionality
16
- for working with hashes, specifically addressing handling of deeply-nested Hashes
17
- for representing rich object structures.\n\nget\n---\n\nThe get method is used to
18
- allow for retrieval of a deeply-nested value in a hash structure.\n\nGiven:\n\n```ruby\nconfig
19
- = {\n :global => {\n :security => {\n :sslroot => '/etc/ssl'\n },\n
20
- \ :pidfile => '/var/run/example.pid'\n },\n :plugins => ['logger', 'cruncher']\n}\n```\n\nThe
21
- following statements are equivalent:\n\n```ruby\nconfig.get('global.security.sslroot')\n\n#
22
- returns the same thing as\n\nconfig[:global][:security][:sslroot]\n```\n\nHowever,
23
- let's say you attempted to get <code>config[:global][:adapters][:path]</code>. You
24
- would get a nasty NilError because <code>:adapters</code> doesn't exist. However,
25
- if you used <code>config.get('global.adapters.path')</code>, the result would just
26
- be <code>nil</code>. _get_ also takes a second argument that let's you specify
27
- the default value if the given path is not found. This lets you very easily work
28
- with rich nested hashes while also specifying sane defaults for missing values.\n\n\nset\n---\n\nThe
29
- set method is the opposite of get. It creates one or more intermediary hashes along
30
- a specified path and setting the value for the last component.\n\n```ruby\ny = {}\ny.set('this.is.a.number',
31
- 4)\n\n# results in\n# {\"this\"=>{\n# \"is\"=>{\n# \"a\"=>{\n# \"number\"=>4\n#
32
- }}}}\n\n```\n"
14
+ description: Hashlib extends the base Ruby Hash class with new methods that offer
15
+ useful functionality for working with hashes, specifically addressing handling of
16
+ deeply-nested Hashes for representing rich object structures.
33
17
  email: garyhetzel@gmail.com
34
18
  executables: []
35
19
  extensions: []