associationist 0.1.6 → 0.1.7

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: 71ae82541e7c023fb388765d041d9f7e9cf3f13084a4299b7f6c2c954197cbf2
4
- data.tar.gz: f49611ceb83887ed9fb24a41611259c3087f715fe612485f9240751613f0ef6a
3
+ metadata.gz: c75eb700e6e6c890aec7cae636c49a57738a00771a12fd09f5dda2d162007e48
4
+ data.tar.gz: 362195a0a4dded2bb3a0d7ebf96ecdedecd03a8e886301e345206da54bce3242
5
5
  SHA512:
6
- metadata.gz: 58b53ffc2067262d0f20682ac3eb26bd0f7cf1d23d3aeb7de1f490b6c8540d0923b0616ded48271f198aa46263a90d2f2dbdd8807cc29885e3a10108628e465e
7
- data.tar.gz: a98b9f10263294b01ea57430fff3004da4ceb26a7395a3ee073071c124235cff37350ba98d0bc034599302d735edd302d5d29877aaff40f7e9420606f9da4702
6
+ metadata.gz: b8688e1747f381abf579877309ca810e3835a10e1abe1dccba27254fa1c78f4bba9fb297e3b801543abb4ce0a8dfa38848b61727a73f37d7e6986306338ce38b
7
+ data.tar.gz: f113f4e66963eeef080acaceed81e533903121119696b1975041b6513436aaaebcb3f9f745fef72ce1cee986bc991396fb77678ab749e17ff474c53f9e81d488
@@ -27,6 +27,14 @@ module Associationist
27
27
  true
28
28
  end
29
29
  end
30
+
31
+ def self.define_writers(mixin, name)
32
+ mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
33
+ def #{name}=(value)
34
+ raise "Virtual associations are read-only."
35
+ end
36
+ CODE
37
+ end
30
38
  end
31
39
  end
32
40
  end
@@ -37,7 +37,7 @@ module Associationist
37
37
  def self.define_writers(mixin, name)
38
38
  mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
39
39
  def #{name}=(value)
40
- association(:#{name}).target = value
40
+ raise "Virtual associations are read-only."
41
41
  end
42
42
  CODE
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module Associationist
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: associationist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
- - CicholGricenchos
7
+ - onyxblade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
@@ -104,7 +104,7 @@ files:
104
104
  - lib/associationist/reflection/collection_reflection.rb
105
105
  - lib/associationist/reflection/singular_reflection.rb
106
106
  - lib/associationist/version.rb
107
- homepage: https://github.com/CicholGricenchos/associationist
107
+ homepage: https://github.com/onyxblade/associationist
108
108
  licenses:
109
109
  - MIT
110
110
  metadata: {}