core-extension 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/core/extension.rb +2 -0
- data/lib/core/extension/behavior.rb +1 -1
- data/lib/core/extension/version.rb +1 -1
- data/lib/is/extension.rb +1 -4
- 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: 95231fea0fd981dbd609b053f8a334003490a1a90805c9168665b5d7574a66b1
|
4
|
+
data.tar.gz: 510b7bb6e4efbf527431cc178a5229b0482ab3280ebc1d4d2c9c9a0290051278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a543f05bbebd33a68b9ad4fdf9d0c91d213d9423790edaefb59a60be4b39496f8b3a83174f9f7592bcd638f2a875cf1830128c139515076ff90955213f4f28c4
|
7
|
+
data.tar.gz: 2cc2758b3c0589e5130c873623de64d8777e5bd3d7959ee2eb7d7446fd9bf3ca8061847d01b91030f374a90a0d45ff077090130d19db9976aedc54d539c75bd0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.1.0](https://github.com/metabahn/corerb/releases/tag/2021-02-10)
|
2
|
+
|
3
|
+
*released on 2021-02-10*
|
4
|
+
|
5
|
+
* `chg` [#3](https://github.com/metabahn/corerb/pull/3) Apply extension dependencies before behavior ([bryanp](https://github.com/bryanp))
|
6
|
+
|
1
7
|
## [v0.0.0](https://github.com/metabahn/corerb/releases/tag/2020-12-29)
|
2
8
|
|
3
9
|
*released on 2020-12-29*
|
data/lib/core/extension.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Core
|
4
4
|
module Extension
|
5
|
-
# [public] Defines behavior that can be applied to objects. Behavior will only be applied to each object once.
|
5
|
+
# [public] Defines behavior that can be applied to objects. Behavior will only be applied to each object once by default.
|
6
6
|
#
|
7
7
|
# force - If true, behavior will be applied even if it has already been applied to the including object.
|
8
8
|
#
|
data/lib/is/extension.rb
CHANGED
@@ -14,24 +14,21 @@ module Is
|
|
14
14
|
end
|
15
15
|
|
16
16
|
# [public] Define a module to be extended or included into objects that include this extension.
|
17
|
-
# See [Core::Extension::Dependency] for argument details.
|
18
17
|
#
|
19
18
|
def extends(*flags, dependencies: [], prepend: false, &block)
|
20
19
|
defined_methods << Core::Extension::Dependency.new(*flags, modules: dependencies, prepend: prepend, &block)
|
21
20
|
end
|
22
21
|
|
23
22
|
# [public] Define behavior to be evaled on objects that include this extension.
|
24
|
-
# See [Core::Extension::Behavior] for argument details.
|
25
23
|
#
|
26
24
|
def applied(force: false, &block)
|
27
25
|
defined_behaviors << Core::Extension::Behavior.new(force: force, &block)
|
28
26
|
end
|
29
27
|
|
30
|
-
# @api private
|
31
28
|
def included(base)
|
32
29
|
enforce_allowed_types(base)
|
33
|
-
apply_defined_behaviors(base)
|
34
30
|
apply_defined_methods(base)
|
31
|
+
apply_defined_behaviors(base)
|
35
32
|
|
36
33
|
super
|
37
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: core-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
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: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create mixins with superpowers.
|
14
14
|
email: bryan@metabahn.com
|
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
requirements: []
|
45
|
-
rubygems_version: 3.
|
45
|
+
rubygems_version: 3.2.4
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: Create mixins with superpowers.
|