ruby_dig 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d693ef850fe9ed76af4081bfcd41c29fde29085
4
- data.tar.gz: 840a4f8139a67ec93021624600dec541e26b7211
3
+ metadata.gz: 168505593905c02218d0adf23bb69b692b9ec8d2
4
+ data.tar.gz: c9c66a5b8775a3ddbe2b001fb25842686583e1ab
5
5
  SHA512:
6
- metadata.gz: 481f89b52a9e9b63f0bb600d76c5219c231c6f1391a9525d153c30ffceded3f70976a501d5842f4b5702c49c47555827c7637329474e8a0b408accd80e265bfd
7
- data.tar.gz: 2aa00078822254d15251aced71edc1a0d9fd35107a4f575ac8b24d8e4c6bf9c0416921695db23a82f69fd45dd87c8f0c01a68bfcff3412520c1d25b5e02d99d2
6
+ metadata.gz: 3c428fb813468e3a0fc759a9beee4ca96653a5ddfaea3ce3e92f6db92c5b4a61792d3a141089990dd2aa9bba6f0acbd1201c674b320506b964c9c6660424ecaf
7
+ data.tar.gz: 9e619f51f7ee8a24d4d3ccd79ea0957774f8aee5d87dc9f721d38aebe4b6610898c7c6deca36437b06c63e13937503edf2d58ec9d48f54fff93b1d5526479046
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # RubyDig
2
2
 
3
- TODO: Write a gem description
3
+ This gem adds Hash#dig and Array#dig from Ruby 2.3+ to earlier versions of Ruby. It is a no-op if you are running Ruby 2.3 or greater.
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,7 +20,19 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ ```
24
+ require 'ruby_dig'
25
+
26
+ response = {mom: {first: "Marge", last: "Bouvier"},
27
+ dad: {first: "Homer", last: "Simpson"},
28
+ kids: [
29
+ {first: "Bart", last: "Simpson"},
30
+ {first: "Lisa", last: "Simpson"}
31
+ ]}
32
+
33
+ response.dig(:kids, 1, :first)
34
+ # => "Lisa"
35
+ ```
24
36
 
25
37
  ## Contributing
26
38
 
@@ -1,3 +1,3 @@
1
1
  module RubyDig
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Colin Kelley"]
10
10
  spec.email = ["colin@invoca.com"]
11
11
  spec.summary = %q{Pure Ruby implementation of Array#dig and Hash#dig for Ruby < 2.3.}
12
- spec.homepage = ""
12
+ spec.homepage = "https://github.com/Invoca/ruby_dig"
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_dig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Kelley
@@ -68,7 +68,7 @@ files:
68
68
  - lib/ruby_dig/version.rb
69
69
  - ruby_dig.gemspec
70
70
  - test/ruby_dig_test.rb
71
- homepage: ''
71
+ homepage: https://github.com/Invoca/ruby_dig
72
72
  licenses:
73
73
  - MIT
74
74
  metadata: {}