has_embedded_document 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 114ae2076fb500aa0099ea103a440ba07a84efc3e0ef90de5572d1b756ccd565
4
- data.tar.gz: 799523e0275cdaef8338b9ed11eb16af00b72da98ae3c0a4acc98f477d7fac06
3
+ metadata.gz: de802f97a864e399338cfd99bad9f5db54f272cb41e0490cf85215259a68e22a
4
+ data.tar.gz: 0ce44ab1a913379aa4d3d0ec3a79b15af0c845238843caddb9f5b068aacca83a
5
5
  SHA512:
6
- metadata.gz: 592b0e77e43de7f5ca0fc72d5bec77b32be6d0496c825a791f78a51161fc2d8c87ebc6fd4fa256d59f6039956bfc38c79093e9c4bce65e2ea55bf192e55bbde8
7
- data.tar.gz: d12b01062644de557a1ce86155c8d931f5da3cb86fdf9c148fb500774925fe0a71a4664683af34b1099f39727397204fc7b0948ed9b8b1b813c11b7d31fa45d0
6
+ metadata.gz: d6f0b28cd44ee2e30b1ce50c39b5c7b937f3115604e236840850b67f4579c3ec70ea944c4a76fc8dc5fbf01755b550f6f5c501a1e10e9dc32dd94d73321828e2
7
+ data.tar.gz: 69a063ae03ad5b87f7288c6e63ea2e4ee8a9828db98d0ff0d1ce39553f67761c8cf29fd6be1b6719c6cbc1dc8e537b3feb6029316469677b8ef7bd62c781b230
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- has_embedded_document (0.1.1)
4
+ has_embedded_document (0.1.2)
5
5
  activerecord (>= 5.2.0)
6
6
 
7
7
  GEM
@@ -99,8 +99,8 @@ module HasEmbeddedDocument
99
99
  attributes = value.is_a?(document_class) ? value.attributes : value
100
100
  writer.call(self, attributes)
101
101
 
102
- document = attributes && document_class.new(attributes.dup)
103
- instance_variable_set(:"@__#{name}_cache", document.readonly!)
102
+ document = attributes && document_class.new(attributes.dup).readonly!
103
+ instance_variable_set(:"@__#{name}_cache", document)
104
104
  end
105
105
  end
106
106
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HasEmbeddedDocument
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_embedded_document
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minty Fresh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord