tiny_dot 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tiny_dot.rb +11 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44f7c9f36e7b3d775cf41774060f0144b5db9006922f271a246aed612288d2bc
4
- data.tar.gz: db865874e1f5b854d6b7b34362e1e5efab6f8340551c5725007f09cd0bc67ca9
3
+ metadata.gz: f31f44aa3ecf2c601378a248041012313341a63f75db817baa6df5d82be0151e
4
+ data.tar.gz: 1787bff26e5ba21dfab2f696aa33bd4f17e0b35100073963db99e348e09081bc
5
5
  SHA512:
6
- metadata.gz: c5bddb3ad6272bb1b3362f79be814ed6c4bc8585b9d1639595055c44c7d9969da4c099a0228ed389cae4eeab3453ac448cdc5570fee0228e5feefb476f01c624
7
- data.tar.gz: 953bcffe9fc13b98ed22b40fdd7a56bde7f889eb775d90eb3b9480e94167573fa875b07f57be6ea887d0a92010e7563827d0e2068b2dc89f54165c081e2ed909
6
+ metadata.gz: 9ec17f00dde5f6a9df6c7a8cb431b4bc3a349a5f84c8ffba1cbcea6b720ec1764cd635183132d6590e71e34ad49c84417b6c051bda6220bd44cb12dc7031c230
7
+ data.tar.gz: 25e0fc3511f15e829a886cfb9c29d7fce6d891c2af8d1032ba39fc5a062da8efbe8d6224d5091ad4923f700fae51ab64ff59974dcb89bdaca820e210b6a08c8c
data/lib/tiny_dot.rb CHANGED
@@ -27,6 +27,17 @@ require 'oj'
27
27
  # replaces spaces and dashes with underscores and converts the keys to symbols.
28
28
  #
29
29
  # Please note that the JSON and YAML are required to be passed as String.
30
+ #
31
+ # Because this module constructs a series of nested Structs from Hash-like
32
+ # inputs, it means you can read/write data pretty easily:
33
+ #
34
+ # > s = TinyDot.from_json(<some deeply nested JSON>)
35
+ # => <struct ... >
36
+ # > s.foo.bar.baz
37
+ # => 5
38
+ # > s.foo.bar.baz = 99
39
+ # < s.foo.bar.baz
40
+ # => 99
30
41
  module TinyDot
31
42
  class << self
32
43
  def from_env
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_dot
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []
39
- rubygems_version: 3.3.7
39
+ rubygems_version: 3.4.1
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: want to have easy dot notation access to data that comes from Hashes, JSON,