fat-rb 0.1.0 → 0.1.1

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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/fat-rb.gemspec +1 -1
  4. data/lib/fat.rb +2 -6
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a5650524ecb53949a2c471268e675261833e67a
4
- data.tar.gz: 01084a031199c786468516f8387614e632e3c53b
3
+ metadata.gz: 6fd16c3522392fab0e6d2655da869ec3ba5682af
4
+ data.tar.gz: 886a2032fd52b09f37ef802d2183f2521035d503
5
5
  SHA512:
6
- metadata.gz: 59f8f95c7cb0a473bf9b1eb48fb482d3a3975ab113bcbea0e3777b380387c312d936bcdd5a378deaa0be974d3b3612e9d9f7c3888f3b51848a826af8950a48ed
7
- data.tar.gz: 95af9ae4043f032d976781a55ae1428d0c4895328fe1b4ac69c424d2cda337eb7f71550cfeb00a05a6296fe4a5290913f1f968e3711ff6ba315f7c7ee17c1191
6
+ metadata.gz: 63678b362e56b8e5f20f6b55e75e0eca54decb6269890c4ff6240f9bcc6a4cc6da859b28a8448d7909ce3a700e520368007b973665dba3a5e47c6a6cd72e235e
7
+ data.tar.gz: 8d5ea85dd5187834070cdf5722fc32f3c43f9abdf4c48f0587e94dcba321a6812be65a37dc99ab5a9b14b85d00899e696721b6457dcd484bc4e6268c8f2221d3
data/README.md CHANGED
@@ -24,7 +24,7 @@ To get your `:value` you usually do `hash["foo"]["bar"]["baz"]`. But what happen
24
24
  I find more comfortable to ask if I can walk to `:value` using the keys `"foo"`, `"bar"`, `"baz"`. If I can't, tell me where the path ends.
25
25
 
26
26
  ```ruby
27
- require "fat"
27
+ require "fat-rb"
28
28
 
29
29
  Fat.at(hash, "foo", "bar", "baz")
30
30
  # => :value
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fat-rb"
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
  s.summary = "Ruby implementation of the Fat gem"
5
5
  s.description = s.summary
6
6
  s.authors = ["Lucas Tolchinsky"]
data/lib/fat.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Fat
2
2
  FatError = Class.new(StandardError)
3
3
 
4
- @fat ||= ->(hash, *args) do
4
+ def self.at(hash, *args)
5
5
  fields = args.length == 1 ? args.first.split(".") : args
6
6
 
7
7
  value = hash
@@ -16,12 +16,8 @@ module Fat
16
16
  value
17
17
  end
18
18
 
19
- def self.at(hash, *args)
20
- @fat.(hash, *args)
21
- end
22
-
23
19
  def at(*args)
24
- Fat.instance_variable_get(:@fat).(self, *args)
20
+ Fat.at(self, *args)
25
21
  end
26
22
  end
27
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Tolchinsky