associationist 0.1.5 → 0.1.6

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: a186e1fe166c48b9bafc22d84e421eb54b558fe3e004bb72ab8447d4e0ddf431
4
- data.tar.gz: 39f5280cbc21527d1fc9f67e841ab9f8c1f40ef96a67012ee6967274de2903e1
3
+ metadata.gz: 71ae82541e7c023fb388765d041d9f7e9cf3f13084a4299b7f6c2c954197cbf2
4
+ data.tar.gz: f49611ceb83887ed9fb24a41611259c3087f715fe612485f9240751613f0ef6a
5
5
  SHA512:
6
- metadata.gz: 6e769a4f0a5e5c4ea3d8c8a00ac1b2f06d4072e575a4e6131c0256a1846a6fbc0ddd6f0fb3f58a2ff0b9584a93946abc29bc5e12652969c49fb60c4e372abb07
7
- data.tar.gz: bf4d00764a6deaebe802f2b60e2f0a8bed901abd50a244d47e421d2a7243f2dacdad36e849dcc2bb26188a2dff432f9c2697aa5a089b724ec15446f9561ae0dd
6
+ metadata.gz: 58b53ffc2067262d0f20682ac3eb26bd0f7cf1d23d3aeb7de1f490b6c8540d0923b0616ded48271f198aa46263a90d2f2dbdd8807cc29885e3a10108628e465e
7
+ data.tar.gz: a98b9f10263294b01ea57430fff3004da4ceb26a7395a3ee073071c124235cff37350ba98d0bc034599302d735edd302d5d29877aaff40f7e9420606f9da4702
@@ -34,6 +34,14 @@ module Associationist
34
34
  Reflection::SingularReflection.new(name, scope, options, model)
35
35
  end
36
36
 
37
+ def self.define_writers(mixin, name)
38
+ mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
39
+ def #{name}=(value)
40
+ association(:#{name}).target = value
41
+ end
42
+ CODE
43
+ end
44
+
37
45
  end
38
46
  end
39
47
  end
@@ -1,3 +1,3 @@
1
1
  module Associationist
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: associationist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - CicholGricenchos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.0.1
126
+ rubygems_version: 3.1.2
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: ''