phlexi-field 0.0.4 → 0.0.5

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: 57191746aff7d40e5de1862c74b9258f6817c204c56d177a638360872d099f65
4
- data.tar.gz: 98e497ae91af23ee2ad55dbaa2884308baf430c95329a939b5af9148a66649b5
3
+ metadata.gz: a2ff865f069b2361127071190b6f17cd58a553d9eadcb3084acce2e3cefbe6df
4
+ data.tar.gz: 6af6e7c11737780a668ea39f86a6436540afa31e2f76a14d0201177e336ff649
5
5
  SHA512:
6
- metadata.gz: a50e1e33e7af6934588da12b3f15d074cb83fe0cda28e7dd875fcf8ca33d9c307354659d2afbb218839bfbafa30db07f398514225f4a2bd2ec2d1c4852782555
7
- data.tar.gz: adbad48ba16812f1691ec357fcee1ea6076274410e714c2becf21dbce9d28a987a5276a863d3704dfe4f25f6681d95566819e53c1fb7f1c11d085beb220096b3
6
+ metadata.gz: 617357cb149cc34431f4615ecc041207565a00e3855400fe804bd18c162af9c4e7b182a49d73c8d01deb122a087969531883316e3b1571595d72a7dbab56e84e
7
+ data.tar.gz: afbfa1cefd2b4a31898e9aa90636f642395fc4d33d57b58989d3aaa8977232ce9d4d1b91602f1f63b4375854f2961de82935b88a5b11c5291fe90a0b55336907
@@ -55,7 +55,7 @@ module Phlexi
55
55
  # Check if object is a has that contains key
56
56
  if object.respond_to?(:fetch)
57
57
  # Fallback to inferring type from the value
58
- return infer_field_type_from_value(object.fetch(key))
58
+ return infer_field_type_from_value(object[key])
59
59
  end
60
60
 
61
61
  # Default to string if we can't determine the type
@@ -108,7 +108,7 @@ module Phlexi
108
108
  # a method call. For example, a `Hash` would be accessed via `user[:email]` instead of `user.send(:email)`
109
109
  def object_value_for(key:)
110
110
  return @object.send(key) if @object.respond_to?(key)
111
- @object.fetch(key) if @object.is_a?(Hash)
111
+ @object[key] if @object.is_a?(Hash)
112
112
  end
113
113
 
114
114
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlexi
4
4
  module Field
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlexi-field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-06 00:00:00.000000000 Z
11
+ date: 2024-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex