evt-subst_attr 2.1.0.3 → 2.2.0.0

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: 7cd9e0e75afa44800d3af10e87c289aaac6955c0c5d679eff4f36e95f2592436
4
- data.tar.gz: 3a61d8de2af93bfa4d1341784461a1db4b02299528aea709ca792b7661cf1f68
3
+ metadata.gz: c564713e7662f0a43698d26b54a62518f160a3b54106d880d8600de692999983
4
+ data.tar.gz: ff04516a334e4a3b56a05215d0093468d9c400f3aedf09dec7e48019997ff1cb
5
5
  SHA512:
6
- metadata.gz: 59b316523005e8cf28b9b493a04bcfc5c08494784b0f9b8da825265bd36246c7b51931c816eea9e6c7175f357bbbaa42760f7fd7b59cce1777bb33f11db7a946
7
- data.tar.gz: da367377a46cd31c69caa583f6d6a9976e80fff8034a03cf9f4898ab4dfa9c8e5c8c5c9f245b413324571ca246338151675293cdba2a79e4cc2e8ed8cc7fee2c
6
+ metadata.gz: a0e25cd5f217bf740c33cf061d0247aec276e7a39fd6a78ea5dec0da70d4d8166b82e8f52c84e0b4d57403622f090b44f99f8a11dde28f1730ab7818291523cc
7
+ data.tar.gz: ea9e18a2d11e640e705c7f523028ec08efba5c2b16d74933d870b98f3815eea532cfa037c034c70af10af9dedd26626687334fe0a3d4eab4d888121f1c059daf
@@ -3,18 +3,23 @@ module SubstAttr
3
3
  module Dependency
4
4
  class Example
5
5
  def self.configure(receiver)
6
- receiver.some_attr = new
6
+ receiver.specialized_substitute_attr = new
7
7
  end
8
8
 
9
9
  module Substitute
10
10
  def self.build
11
- :some_substutute
11
+ :some_substitute
12
12
  end
13
13
  end
14
14
 
15
15
  class Descendant < Example
16
16
  end
17
17
  end
18
+
19
+ module NoSubstitute
20
+ class Example
21
+ end
22
+ end
18
23
  end
19
24
  end
20
25
  end
@@ -3,9 +3,11 @@ module SubstAttr
3
3
  class Example
4
4
  include SubstAttr
5
5
 
6
- subst_attr :some_attr, Dependency::Example
6
+ subst_attr :specialized_substitute_attr, Dependency::Example
7
7
 
8
- subst_attr :weak_attr
8
+ subst_attr :strict_substitute_attr, Dependency::NoSubstitute::Example
9
+
10
+ subst_attr :weak_substitute_attr
9
11
 
10
12
  def self.build
11
13
  new.tap do |instance|
@@ -29,6 +29,10 @@ module SubstAttr
29
29
 
30
30
  specialization_module = reflection.constant
31
31
 
32
+ if specialization_module.equal?(self)
33
+ return nil
34
+ end
35
+
32
36
  unless specialization_module.respond_to?(:build)
33
37
  return nil
34
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-subst_attr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.3
4
+ version: 2.2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-attribute
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.1.2
106
+ rubygems_version: 3.2.15
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Declare attributes that have default implementations that are substitutes