core-state 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/core/state/version.rb +1 -1
- data/lib/is/stateful.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc77a1d51f01d64addaf2f51e786ebd3fb34e3b872a93b77784b7b37d4ae215e
|
4
|
+
data.tar.gz: 6bdf81604e1630610ba65165b555f297f51b2939babadd7758048a40cce60771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ccc3ca6537fb926e2dd91471911299ed279bc6e9d675d1792afe5ec8abdbffeff768c6f4ec938658b262a33e90737ce371b2a59d62f56a2ea5411dafd355c38
|
7
|
+
data.tar.gz: b10328010f5089ab9d38491b3231301d62ea1e87788d730ae67b1e4fb3ff9523c1829c214c2a7911bbd466845e72d3d073cc7c2649d403549c529b19e0211e35
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## [v0.1.8](https://github.com/metabahn/corerb/releases/tag/2023-05-07)
|
2
|
+
|
3
|
+
*released on 2023-05-07*
|
4
|
+
|
5
|
+
* `fix` [#132](https://github.com/bryanp/corerb/pull/132) Fix state inheritence ([bryanp](https://github.com/bryanp))
|
6
|
+
|
7
|
+
## [v0.1.7](https://github.com/metabahn/corerb/releases/tag/2021-11-23.1)
|
8
|
+
|
9
|
+
*released on 2021-11-23*
|
10
|
+
|
11
|
+
* `chg` [#109](https://github.com/metabahn/corerb/pull/109) Prefer `__send__` to `send` ([bryanp](https://github.com/bryanp))
|
12
|
+
|
1
13
|
## [v0.1.6](https://github.com/metabahn/corerb/releases/tag/2021-11-02)
|
2
14
|
|
3
15
|
*released on 2021-11-02*
|
data/lib/core/state/version.rb
CHANGED
data/lib/is/stateful.rb
CHANGED
@@ -181,12 +181,12 @@ module Is
|
|
181
181
|
def inherited(subclass)
|
182
182
|
defined_state.each_pair do |name, state|
|
183
183
|
if state[:class]
|
184
|
-
subclass.instance_variable_set(name,
|
184
|
+
subclass.instance_variable_set(name, instance_variable_get(name))
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
188
|
-
subclass.
|
189
|
-
subclass.instance_variable_set(
|
188
|
+
subclass.__send__(:prepend_defined_state_modules)
|
189
|
+
subclass.instance_variable_set(:@__defined_state__, @__defined_state__.each_with_object({}) { |(key, value), state|
|
190
190
|
state[key] = value.dup
|
191
191
|
})
|
192
192
|
|
@@ -240,7 +240,7 @@ module Is
|
|
240
240
|
extends :implementation, prepend: true do
|
241
241
|
def initialize(...)
|
242
242
|
self_class = self.class
|
243
|
-
self_class.
|
243
|
+
self_class.__send__(:defined_state).each_pair do |name, state|
|
244
244
|
if state[:instance]
|
245
245
|
if state[:class]
|
246
246
|
instance_variable_set(name, self_class.instance_variable_get(name))
|
@@ -264,7 +264,7 @@ module Is
|
|
264
264
|
# [public] Safely mutates state by name, yielding a copy of the current value to the block.
|
265
265
|
#
|
266
266
|
def mutate_state(name, &block)
|
267
|
-
|
267
|
+
__send__("#{name}=", block.call(__send__(name)))
|
268
268
|
end
|
269
269
|
|
270
270
|
private def defined_state_isolations
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: core-state
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: core-extension
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.
|
71
|
+
rubygems_version: 3.4.12
|
72
72
|
signing_key:
|
73
73
|
specification_version: 4
|
74
74
|
summary: Easily manage object state.
|