object_inspector 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/object_inspector/formatters/templating_formatter.rb +8 -10
- data/lib/object_inspector/scope.rb +8 -4
- data/lib/object_inspector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0239fa0f437f4adba26fc4e851432bd52a2281e111e18adadb08193e0e8211eb'
|
4
|
+
data.tar.gz: 2c3b6c55c0abe681c0714909df5c78763389fbc3ea635a704a2643adc14b9701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f57d2cf29f436f587a30dc29cca58db4ca735504a3f73c18f79e618960627acb948ac382e9f78372455c90d8e956ad3082643c23e69b224f3ebb515e446513f
|
7
|
+
data.tar.gz: af46679e2a81eb89d4c14743f1632219f5f8e30106257e8a4e716a396d3ada87e6c8dc86e9cc83df39f7b057767b1f56aec9dc1f20a64955345ef2ac6831edee
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -33,6 +33,10 @@ module ObjectInspector
|
|
33
33
|
@flags_and_info_template ||= "<%s(%s) %s>".freeze
|
34
34
|
end
|
35
35
|
|
36
|
+
def self.flags_and_issues_template
|
37
|
+
@flags_and_issues_template ||= "<%s(%s) !!%s!!>".freeze
|
38
|
+
end
|
39
|
+
|
36
40
|
def self.issues_and_info_template
|
37
41
|
@issues_and_info_template ||= "<%s !!%s!! %s>".freeze
|
38
42
|
end
|
@@ -149,16 +153,6 @@ module ObjectInspector
|
|
149
153
|
end
|
150
154
|
end
|
151
155
|
|
152
|
-
def build_string_with_flags_and_maybe_info_and_name
|
153
|
-
if info
|
154
|
-
build_string_with_flags_and_info_and_maybe_name
|
155
|
-
elsif name
|
156
|
-
build_string_with_flags_and_name
|
157
|
-
else
|
158
|
-
build_string_with_flags
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
156
|
def build_string_with_flags_and_info_and_maybe_name
|
163
157
|
if name
|
164
158
|
build_string_with_flags_and_info_and_name
|
@@ -200,6 +194,10 @@ module ObjectInspector
|
|
200
194
|
[identification, flags, issues, info]
|
201
195
|
end
|
202
196
|
|
197
|
+
def build_string_with_flags_and_issues
|
198
|
+
self.class.flags_and_issues_template % [identification, flags, issues]
|
199
|
+
end
|
200
|
+
|
203
201
|
def build_string_with_flags_and_info
|
204
202
|
self.class.flags_and_info_template % [identification, flags, info]
|
205
203
|
end
|
@@ -25,7 +25,8 @@ module ObjectInspector
|
|
25
25
|
# @param separator [#to_s] (ObjectInspector.configuration.flags_separator)
|
26
26
|
def join_name(parts,
|
27
27
|
separator: ObjectInspector.configuration.name_separator)
|
28
|
-
Array(parts)
|
28
|
+
the_parts = Array(parts)
|
29
|
+
the_parts.join(separator) if the_parts.any?
|
29
30
|
end
|
30
31
|
|
31
32
|
# Join the passed-in flags with the passed in separator.
|
@@ -34,7 +35,8 @@ module ObjectInspector
|
|
34
35
|
# @param separator [#to_s] (ObjectInspector.configuration.flags_separator)
|
35
36
|
def join_flags(flags,
|
36
37
|
separator: ObjectInspector.configuration.flags_separator)
|
37
|
-
Array(flags)
|
38
|
+
the_flags = Array(flags)
|
39
|
+
the_flags.join(separator) if the_flags.any?
|
38
40
|
end
|
39
41
|
|
40
42
|
# Join the passed-in issues with the passed in separator.
|
@@ -43,7 +45,8 @@ module ObjectInspector
|
|
43
45
|
# @param separator [#to_s] (ObjectInspector.configuration.issues_separator)
|
44
46
|
def join_issues(issues,
|
45
47
|
separator: ObjectInspector.configuration.issues_separator)
|
46
|
-
Array(issues)
|
48
|
+
the_issues = Array(issues)
|
49
|
+
the_issues.join(separator) if the_issues.any?
|
47
50
|
end
|
48
51
|
|
49
52
|
# Join the passed-in items with the passed in separator.
|
@@ -52,7 +55,8 @@ module ObjectInspector
|
|
52
55
|
# @param separator [#to_s] (ObjectInspector.configuration.info_separator)
|
53
56
|
def join_info(items,
|
54
57
|
separator: ObjectInspector.configuration.info_separator)
|
55
|
-
Array(items)
|
58
|
+
the_items = Array(items)
|
59
|
+
the_items.join(separator) if the_items.any?
|
56
60
|
end
|
57
61
|
|
58
62
|
# Compare self with the passed in object.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: object_inspector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Dobbins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|