sawyer 0.9.1 → 0.9.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
  SHA256:
3
- metadata.gz: 64487d4cb58ab69521a75070aedc4630968e138ca03add5e10f0a7933f007004
4
- data.tar.gz: ecc9fb91e96931cc9e275ec976effbd88850a55a5f54c3ea521488b465d5b8bf
3
+ metadata.gz: 93fd70e92dbde52d2fca8638b8ac073fa959bee9d55164458acc8d8ffda40efb
4
+ data.tar.gz: 36a3e20d2d434fb0fd76be43f42b9a732d27a9bb21e80a9eeb8e4b51f003e2e9
5
5
  SHA512:
6
- metadata.gz: 7cdaadda1829426240d8f839c1065fa94b05014ebfede30367179c4e3d0add95484b1d6f3660e6bd810714beb7d6e1a3a814ce908539bd35b57e51a0b6a1e7ef
7
- data.tar.gz: 3c4a5da79f2321361d0f6e9a36fa7d177eb0a087fb3514c66d1de3de0b932aa1b0fda2954e9df5815c5603367c8d1799031d16fd717299cccb73d1c80778ca27
6
+ metadata.gz: 3a8d00e32c35c4ef4ff5eddc828f055f2ccca4d3fa93077ae0998d7a26f562c49d543d2a3c6cb1690a50f0ec2ee14bb9037c08d013b044b3b3be38f2f8aa1b95
7
+ data.tar.gz: 3398b297bdc14fcf605b09cc2ad8de49b590c055019586c3f9d02bed8fbb0124c09e908fdd718325a53c0d6fee9a84a4b283ba527d9b0f1813315447e891de00
@@ -1,9 +1,12 @@
1
+ require 'forwardable'
2
+
1
3
  module Sawyer
2
4
  class Resource
3
5
  SPECIAL_METHODS = Set.new(%w(agent rels fields))
4
6
  attr_reader :_agent, :_rels, :_fields
5
7
  attr_reader :attrs
6
8
  include Enumerable
9
+ extend Forwardable
7
10
 
8
11
  # Initializes a Resource with the given data.
9
12
  #
@@ -69,6 +72,8 @@ module Sawyer
69
72
  nil
70
73
  end
71
74
 
75
+ def_delegators :attrs, :dig, :fetch
76
+
72
77
  ATTR_SETTER = '='.freeze
73
78
  ATTR_PREDICATE = '?'.freeze
74
79
 
data/lib/sawyer.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sawyer
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
 
4
4
  class Error < StandardError; end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sawyer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Olson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-19 00:00:00.000000000 Z
12
+ date: 2022-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday