core-inspect 0.0.1 → 0.0.2
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/inspect/version.rb +1 -1
- data/lib/is/inspectable.rb +8 -8
- 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: 8cbeeb594ebe68c5deb082181273cda6e5bd54f1ef25dc0efa13a5fd824ed65c
|
4
|
+
data.tar.gz: b47f293f1c54b870f7b0fb08a23746b8c814941ab06e9fc11cf2b3897031a82d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ddff2d8acfe055771918564e6ea2b67cc2e4bd837c7d072156e5384a8d727d477e1140f57cdab9227093006beeb89abed1add8e8391dd4e3fc873ead34cdfa
|
7
|
+
data.tar.gz: d2d72c906922250d42f6820968f411c699849a7578f89139cab4f4a18b85774805bcf717ed274e176d33afa4247370e06c2c69cc9fa727c3db1c1e47392e1aef
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.0.2](https://github.com/metabahn/corerb/releases/tag/2021-11-02)
|
2
|
+
|
3
|
+
*released on 2021-11-02*
|
4
|
+
|
5
|
+
* `chg` [#97](https://github.com/metabahn/corerb/pull/97) Designate internal state with leading and trailing double underscores ([bryanp](https://github.com/bryanp))
|
6
|
+
|
1
7
|
## [v0.0.0](https://github.com/metabahn/corerb/releases/tag/2021-07-07)
|
2
8
|
|
3
9
|
*released on 2021-07-07*
|
data/lib/core/inspect/version.rb
CHANGED
data/lib/is/inspectable.rb
CHANGED
@@ -19,13 +19,13 @@ module Is
|
|
19
19
|
#
|
20
20
|
def inspects(*inspectables, without: [])
|
21
21
|
if inspectables.any?
|
22
|
-
mutate_state :
|
22
|
+
mutate_state :__inspectables__ do |current_inspectables|
|
23
23
|
current_inspectables.concat(inspectables.map(&:to_s)).uniq
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
if without.any?
|
28
|
-
mutate_state :
|
28
|
+
mutate_state :__uninspectables__ do |current_uninspectables|
|
29
29
|
current_uninspectables.concat(without.map(&:to_s)).uniq
|
30
30
|
end
|
31
31
|
end
|
@@ -33,8 +33,8 @@ module Is
|
|
33
33
|
end
|
34
34
|
|
35
35
|
applies do
|
36
|
-
state :
|
37
|
-
state :
|
36
|
+
state :__inspectables__, default: []
|
37
|
+
state :__uninspectables__, default: []
|
38
38
|
end
|
39
39
|
|
40
40
|
# [public] Inspects the object.
|
@@ -62,8 +62,8 @@ module Is
|
|
62
62
|
end
|
63
63
|
|
64
64
|
private def each_inspectable
|
65
|
-
inspectables = if
|
66
|
-
|
65
|
+
inspectables = if __inspectables__.any?
|
66
|
+
__inspectables__
|
67
67
|
else
|
68
68
|
instance_variables.map(&:to_s).reject { |instance_variable|
|
69
69
|
instance_variable.start_with?("@_")
|
@@ -71,7 +71,7 @@ module Is
|
|
71
71
|
end
|
72
72
|
|
73
73
|
inspectables.each do |inspectable|
|
74
|
-
unless
|
74
|
+
unless __uninspectables__.include?(inspectable)
|
75
75
|
yield inspectable
|
76
76
|
end
|
77
77
|
end
|
@@ -93,7 +93,7 @@ module Is
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def inspected_objects
|
96
|
-
localized(:
|
96
|
+
localized(:__corerb_inspected_objects__) || localize(:__corerb_inspected_objects__, {})
|
97
97
|
end
|
98
98
|
end
|
99
99
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: core-inspect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: core-extension
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
rubygems_version: 3.2.
|
85
|
+
rubygems_version: 3.2.22
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Customized inspections for any object.
|