inch 0.4.10 → 0.5.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -11
- data/Gemfile +2 -5
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/bin/inch +3 -3
- data/config/defaults.rb +0 -7
- data/inch.gemspec +7 -7
- data/lib/inch.rb +9 -9
- data/lib/inch/api.rb +10 -10
- data/lib/inch/api/compare.rb +2 -2
- data/lib/inch/api/compare/code_objects.rb +3 -2
- data/lib/inch/api/compare/codebases.rb +1 -1
- data/lib/inch/api/diff.rb +10 -7
- data/lib/inch/api/filter.rb +1 -1
- data/lib/inch/api/get.rb +1 -1
- data/lib/inch/api/options/base.rb +4 -4
- data/lib/inch/api/options/filter.rb +4 -0
- data/lib/inch/api/options/suggest.rb +5 -1
- data/lib/inch/api/stats.rb +1 -0
- data/lib/inch/api/suggest.rb +10 -9
- data/lib/inch/cli.rb +6 -6
- data/lib/inch/cli/arguments.rb +2 -2
- data/lib/inch/cli/command.rb +15 -15
- data/lib/inch/cli/command/base.rb +4 -4
- data/lib/inch/cli/command/console.rb +5 -5
- data/lib/inch/cli/command/diff.rb +8 -7
- data/lib/inch/cli/command/inspect.rb +4 -5
- data/lib/inch/cli/command/list.rb +4 -4
- data/lib/inch/cli/command/options/base.rb +8 -8
- data/lib/inch/cli/command/options/base_list.rb +5 -9
- data/lib/inch/cli/command/options/console.rb +3 -4
- data/lib/inch/cli/command/options/diff.rb +6 -8
- data/lib/inch/cli/command/options/inspect.rb +2 -2
- data/lib/inch/cli/command/options/list.rb +2 -3
- data/lib/inch/cli/command/options/show.rb +2 -2
- data/lib/inch/cli/command/options/stats.rb +1 -2
- data/lib/inch/cli/command/options/suggest.rb +3 -6
- data/lib/inch/cli/command/output/base.rb +6 -4
- data/lib/inch/cli/command/output/console.rb +5 -4
- data/lib/inch/cli/command/output/diff.rb +6 -6
- data/lib/inch/cli/command/output/inspect.rb +8 -6
- data/lib/inch/cli/command/output/list.rb +1 -0
- data/lib/inch/cli/command/output/show.rb +5 -4
- data/lib/inch/cli/command/output/stats.rb +21 -21
- data/lib/inch/cli/command/output/suggest.rb +27 -30
- data/lib/inch/cli/command/show.rb +4 -4
- data/lib/inch/cli/command/stats.rb +4 -4
- data/lib/inch/cli/command/suggest.rb +6 -6
- data/lib/inch/cli/command_parser.rb +5 -6
- data/lib/inch/cli/sparkline_helper.rb +6 -6
- data/lib/inch/cli/trace_helper.rb +1 -1
- data/lib/inch/cli/yardopts_helper.rb +3 -4
- data/lib/inch/code_object.rb +3 -3
- data/lib/inch/code_object/converter.rb +8 -6
- data/lib/inch/code_object/provider.rb +1 -1
- data/lib/inch/code_object/provider/yard.rb +12 -10
- data/lib/inch/code_object/provider/yard/docstring.rb +19 -51
- data/lib/inch/code_object/provider/yard/nodoc_helper.rb +4 -4
- data/lib/inch/code_object/provider/yard/object.rb +10 -12
- data/lib/inch/code_object/provider/yard/object/base.rb +27 -48
- data/lib/inch/code_object/provider/yard/object/method_object.rb +10 -47
- data/lib/inch/code_object/provider/yard/object/method_parameter_object.rb +6 -10
- data/lib/inch/code_object/provider/yard/object/method_signature.rb +8 -12
- data/lib/inch/code_object/provider/yard/object/namespace_object.rb +4 -1
- data/lib/inch/code_object/provider/yard/parser.rb +3 -3
- data/lib/inch/code_object/proxy.rb +9 -10
- data/lib/inch/code_object/proxy/base.rb +10 -12
- data/lib/inch/code_object/proxy/method_object.rb +2 -3
- data/lib/inch/code_object/proxy/method_parameter_object.rb +3 -5
- data/lib/inch/codebase.rb +5 -4
- data/lib/inch/codebase/objects_filter.rb +4 -2
- data/lib/inch/codebase/serializer.rb +3 -3
- data/lib/inch/config.rb +2 -2
- data/lib/inch/config/base.rb +1 -0
- data/lib/inch/config/codebase.rb +4 -4
- data/lib/inch/core_ext.rb +1 -1
- data/lib/inch/core_ext/string.rb +1 -1
- data/lib/inch/evaluation.rb +15 -16
- data/lib/inch/evaluation/file.rb +1 -1
- data/lib/inch/evaluation/grade_list.rb +2 -2
- data/lib/inch/evaluation/object_schema.rb +1 -1
- data/lib/inch/evaluation/proxy.rb +7 -8
- data/lib/inch/evaluation/proxy/base.rb +10 -13
- data/lib/inch/evaluation/proxy/constant_object.rb +1 -1
- data/lib/inch/evaluation/proxy/method_object.rb +5 -12
- data/lib/inch/evaluation/proxy/module_object.rb +1 -1
- data/lib/inch/evaluation/proxy/namespace_object.rb +1 -1
- data/lib/inch/evaluation/role/base.rb +1 -1
- data/lib/inch/evaluation/role/method.rb +2 -2
- data/lib/inch/evaluation/role/method_parameter.rb +1 -2
- data/lib/inch/evaluation/role/object.rb +2 -2
- data/lib/inch/rake.rb +2 -2
- data/lib/inch/rake/suggest.rb +2 -3
- data/lib/inch/utils/shell_helper.rb +1 -1
- data/lib/inch/utils/ui.rb +5 -5
- data/lib/inch/utils/weighted_list.rb +3 -2
- data/lib/inch/version.rb +1 -1
- data/test/fixtures/simple/lib/broken.rb +7 -35
- data/test/fixtures/simple/lib/foo.rb +1 -22
- data/test/integration/api/compare/codebases.rb +1 -1
- data/test/integration/cli/command/console_test.rb +5 -5
- data/test/integration/cli/command/inspect_test.rb +5 -4
- data/test/integration/cli/command/list_test.rb +4 -3
- data/test/integration/cli/command/show_test.rb +4 -4
- data/test/integration/cli/command/stats_test.rb +2 -2
- data/test/integration/cli/command/suggest_test.rb +10 -10
- data/test/integration/stats_options_test.rb +3 -3
- data/test/integration/visibility_options_test.rb +13 -13
- data/test/shared/base_list.rb +3 -4
- data/test/test_helper.rb +6 -16
- data/test/unit/api/filter_test.rb +7 -7
- data/test/unit/api/get_test.rb +1 -1
- data/test/unit/api/list_test.rb +1 -1
- data/test/unit/api/options/base_test.rb +3 -3
- data/test/unit/api/stats_test.rb +1 -1
- data/test/unit/api/suggest_test.rb +3 -3
- data/test/unit/cli/arguments_test.rb +1 -1
- data/test/unit/cli/command/base_test.rb +1 -1
- data/test/unit/cli/command/options/base_list_test.rb +2 -2
- data/test/unit/cli/command/options/base_object_test.rb +1 -1
- data/test/unit/cli/command/options/base_test.rb +1 -1
- data/test/unit/cli/command_parser_test.rb +2 -2
- data/test/unit/cli/trace_helper_test.rb +1 -1
- data/test/unit/cli/yardopts_helper_test.rb +3 -4
- data/test/unit/code_object/converter_test.rb +1 -1
- data/test/unit/code_object/provider/yard/docstring_test.rb +28 -106
- data/test/unit/code_object/provider/yard/nodoc_helper_test.rb +5 -6
- data/test/unit/code_object/provider/yard/object/method_object_test.rb +10 -20
- data/test/unit/code_object/provider/yard_test.rb +4 -4
- data/test/unit/code_object/provider_test.rb +1 -1
- data/test/unit/code_object/proxy/method_object_test.rb +262 -382
- data/test/unit/code_object/proxy_test.rb +1 -1
- data/test/unit/codebase/objects_test.rb +2 -2
- data/test/unit/codebase/proxy_test.rb +1 -1
- data/test/unit/config/codebase_test.rb +1 -1
- data/test/unit/evaluation/role/base_test.rb +2 -2
- data/test/unit/utils/ui_test.rb +4 -4
- data/test/unit/utils/weighted_list_test.rb +4 -7
- metadata +4 -14
- data/.rubocop.yml +0 -15
- data/.rubocop_todo.yml +0 -94
- data/lib/inch/code_object/provider/yard/object/class_variable_object.rb +0 -12
- data/lib/inch/code_object/proxy/class_variable_object.rb +0 -8
- data/lib/inch/evaluation/proxy/class_variable_object.rb +0 -19
- data/lib/inch/evaluation/role/class_variable.rb +0 -55
- data/test/fixtures/simple/lib/broken_ruby_2_0_features.rb +0 -7
- data/test/fixtures/simple/lib/directives.rb +0 -8
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) +
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
2
2
|
|
3
3
|
describe ::Inch::Codebase::Objects do
|
4
4
|
before do
|
@@ -18,7 +18,7 @@ describe ::Inch::Codebase::Objects do
|
|
18
18
|
|
19
19
|
it "should support iteration" do
|
20
20
|
sum = 0
|
21
|
-
@objects.each do
|
21
|
+
@objects.each do |o|
|
22
22
|
sum += 1
|
23
23
|
end
|
24
24
|
assert_equal @objects.size, sum
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) +
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
|
2
2
|
|
3
3
|
class MockPrivateRole < ::Inch::Evaluation::Role::Base
|
4
4
|
applicable_if :private?
|
@@ -13,7 +13,7 @@ class MockPublicRole < ::Inch::Evaluation::Role::Base
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class MockIndifferentRole < ::Inch::Evaluation::Role::Base
|
16
|
-
def self.applicable?(
|
16
|
+
def self.applicable?(object)
|
17
17
|
true
|
18
18
|
end
|
19
19
|
end
|
data/test/unit/utils/ui_test.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) +
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
2
2
|
|
3
3
|
describe ::Inch::Utils::UI do
|
4
4
|
it "should trace" do
|
@@ -20,18 +20,18 @@ describe ::Inch::Utils::UI do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should trace debug if ENV variable is set" do
|
23
|
-
ENV[
|
23
|
+
ENV['DEBUG'] = "1"
|
24
24
|
out, err = capture_io do
|
25
25
|
@instance = ::Inch::Utils::UI.new
|
26
26
|
@instance.debug("Test")
|
27
27
|
end
|
28
|
-
ENV[
|
28
|
+
ENV['DEBUG'] = nil
|
29
29
|
refute out.empty?, "there should be no output"
|
30
30
|
assert err.empty?, "there should be no errors"
|
31
31
|
end
|
32
32
|
|
33
33
|
it "should not trace debug if ENV variable is set" do
|
34
|
-
refute ENV[
|
34
|
+
refute ENV['DEBUG']
|
35
35
|
out, err = capture_io do
|
36
36
|
@instance = ::Inch::Utils::UI.new
|
37
37
|
@instance.debug("Test")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) +
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
2
2
|
|
3
3
|
describe ::Inch::Utils::WeightedList do
|
4
4
|
before do
|
@@ -7,11 +7,8 @@ describe ::Inch::Utils::WeightedList do
|
|
7
7
|
|
8
8
|
def assert_weighted_list(list, counts, expected)
|
9
9
|
weighted_list = ::Inch::Utils::WeightedList.new(list, counts)
|
10
|
-
# assert_equal expected.map(&:size).inject(:+),
|
11
|
-
|
12
|
-
assert_equal expected, weighted_list.to_a,
|
13
|
-
"should be #{expected.map(&:size)}, was " \
|
14
|
-
"#{weighted_list.to_a.map(&:size)}"
|
10
|
+
# assert_equal expected.map(&:size).inject(:+), weighted_list.to_a.map(&:size).inject(:+)
|
11
|
+
assert_equal expected, weighted_list.to_a, "should be #{expected.map(&:size)}, was #{weighted_list.to_a.map(&:size)}"
|
15
12
|
end
|
16
13
|
|
17
14
|
def list_and_expected(counts, expected_counts)
|
@@ -22,7 +19,7 @@ describe ::Inch::Utils::WeightedList do
|
|
22
19
|
expected = expected_counts.map.with_index do |num, index|
|
23
20
|
(1..num).map { |i| :"#{elements[index]}#{i}" }
|
24
21
|
end
|
25
|
-
|
22
|
+
return list, expected
|
26
23
|
end
|
27
24
|
|
28
25
|
it "should work if elements are exact" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- René Föhring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,8 +117,6 @@ extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
119
|
- ".gitignore"
|
120
|
-
- ".rubocop.yml"
|
121
|
-
- ".rubocop_todo.yml"
|
122
120
|
- ".ruby-gemset"
|
123
121
|
- ".ruby-version"
|
124
122
|
- ".simplecov"
|
@@ -191,7 +189,6 @@ files:
|
|
191
189
|
- lib/inch/code_object/provider/yard/object.rb
|
192
190
|
- lib/inch/code_object/provider/yard/object/base.rb
|
193
191
|
- lib/inch/code_object/provider/yard/object/class_object.rb
|
194
|
-
- lib/inch/code_object/provider/yard/object/class_variable_object.rb
|
195
192
|
- lib/inch/code_object/provider/yard/object/constant_object.rb
|
196
193
|
- lib/inch/code_object/provider/yard/object/method_object.rb
|
197
194
|
- lib/inch/code_object/provider/yard/object/method_parameter_object.rb
|
@@ -203,7 +200,6 @@ files:
|
|
203
200
|
- lib/inch/code_object/proxy.rb
|
204
201
|
- lib/inch/code_object/proxy/base.rb
|
205
202
|
- lib/inch/code_object/proxy/class_object.rb
|
206
|
-
- lib/inch/code_object/proxy/class_variable_object.rb
|
207
203
|
- lib/inch/code_object/proxy/constant_object.rb
|
208
204
|
- lib/inch/code_object/proxy/method_object.rb
|
209
205
|
- lib/inch/code_object/proxy/method_parameter_object.rb
|
@@ -228,13 +224,11 @@ files:
|
|
228
224
|
- lib/inch/evaluation/proxy.rb
|
229
225
|
- lib/inch/evaluation/proxy/base.rb
|
230
226
|
- lib/inch/evaluation/proxy/class_object.rb
|
231
|
-
- lib/inch/evaluation/proxy/class_variable_object.rb
|
232
227
|
- lib/inch/evaluation/proxy/constant_object.rb
|
233
228
|
- lib/inch/evaluation/proxy/method_object.rb
|
234
229
|
- lib/inch/evaluation/proxy/module_object.rb
|
235
230
|
- lib/inch/evaluation/proxy/namespace_object.rb
|
236
231
|
- lib/inch/evaluation/role/base.rb
|
237
|
-
- lib/inch/evaluation/role/class_variable.rb
|
238
232
|
- lib/inch/evaluation/role/constant.rb
|
239
233
|
- lib/inch/evaluation/role/method.rb
|
240
234
|
- lib/inch/evaluation/role/method_parameter.rb
|
@@ -260,8 +254,6 @@ files:
|
|
260
254
|
- test/fixtures/really_good_pedantic/lib/foo.rb
|
261
255
|
- test/fixtures/simple/README
|
262
256
|
- test/fixtures/simple/lib/broken.rb
|
263
|
-
- test/fixtures/simple/lib/broken_ruby_2_0_features.rb
|
264
|
-
- test/fixtures/simple/lib/directives.rb
|
265
257
|
- test/fixtures/simple/lib/foo.rb
|
266
258
|
- test/fixtures/simple/lib/nodoc.rb
|
267
259
|
- test/fixtures/simple/lib/role_methods.rb
|
@@ -323,9 +315,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
323
315
|
version: '0'
|
324
316
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
325
317
|
requirements:
|
326
|
-
- - "
|
318
|
+
- - ">"
|
327
319
|
- !ruby/object:Gem::Version
|
328
|
-
version:
|
320
|
+
version: 1.3.1
|
329
321
|
requirements: []
|
330
322
|
rubyforge_project:
|
331
323
|
rubygems_version: 2.2.0
|
@@ -345,8 +337,6 @@ test_files:
|
|
345
337
|
- test/fixtures/really_good_pedantic/lib/foo.rb
|
346
338
|
- test/fixtures/simple/README
|
347
339
|
- test/fixtures/simple/lib/broken.rb
|
348
|
-
- test/fixtures/simple/lib/broken_ruby_2_0_features.rb
|
349
|
-
- test/fixtures/simple/lib/directives.rb
|
350
340
|
- test/fixtures/simple/lib/foo.rb
|
351
341
|
- test/fixtures/simple/lib/nodoc.rb
|
352
342
|
- test/fixtures/simple/lib/role_methods.rb
|
data/.rubocop.yml
DELETED
data/.rubocop_todo.yml
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2014-08-09 22:59:20 +0200 using RuboCop version 0.24.1.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
# Offense count: 2
|
9
|
-
Lint/AmbiguousOperator:
|
10
|
-
Enabled: false
|
11
|
-
|
12
|
-
# Offense count: 87
|
13
|
-
Lint/AmbiguousRegexpLiteral:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
# Offense count: 1
|
17
|
-
Lint/Debugger:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
# Offense count: 3
|
21
|
-
# Cop supports --auto-correct.
|
22
|
-
Lint/UnusedMethodArgument:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
# Offense count: 5
|
26
|
-
Style/AccessorMethodName:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
# Offense count: 3
|
30
|
-
Style/AsciiComments:
|
31
|
-
Enabled: false
|
32
|
-
|
33
|
-
# Offense count: 1
|
34
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
35
|
-
Style/ClassAndModuleChildren:
|
36
|
-
Enabled: false
|
37
|
-
|
38
|
-
# Offense count: 5
|
39
|
-
# Configuration parameters: CountComments.
|
40
|
-
Style/ClassLength:
|
41
|
-
Max: 195
|
42
|
-
|
43
|
-
# Offense count: 2
|
44
|
-
Style/CyclomaticComplexity:
|
45
|
-
Max: 7
|
46
|
-
|
47
|
-
# Offense count: 85
|
48
|
-
Style/Documentation:
|
49
|
-
Enabled: false
|
50
|
-
|
51
|
-
# Offense count: 2
|
52
|
-
Style/DoubleNegation:
|
53
|
-
Enabled: false
|
54
|
-
|
55
|
-
# Offense count: 11
|
56
|
-
# Configuration parameters: MinBodyLength.
|
57
|
-
Style/GuardClause:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
# Offense count: 1
|
61
|
-
# Configuration parameters: MaxLineLength.
|
62
|
-
Style/IfUnlessModifier:
|
63
|
-
Enabled: false
|
64
|
-
|
65
|
-
# Offense count: 10
|
66
|
-
# Configuration parameters: AllowURI.
|
67
|
-
Style/LineLength:
|
68
|
-
Max: 111
|
69
|
-
|
70
|
-
# Offense count: 23
|
71
|
-
# Configuration parameters: CountComments.
|
72
|
-
Style/MethodLength:
|
73
|
-
Max: 34
|
74
|
-
|
75
|
-
# Offense count: 22
|
76
|
-
# Configuration parameters: NamePrefixBlacklist.
|
77
|
-
Style/PredicateName:
|
78
|
-
Enabled: false
|
79
|
-
|
80
|
-
# Offense count: 2
|
81
|
-
# Configuration parameters: Methods.
|
82
|
-
Style/SingleLineBlockParams:
|
83
|
-
Enabled: false
|
84
|
-
|
85
|
-
# Offense count: 45
|
86
|
-
# Cop supports --auto-correct.
|
87
|
-
Style/SingleSpaceBeforeFirstArg:
|
88
|
-
Enabled: false
|
89
|
-
|
90
|
-
# Offense count: 5
|
91
|
-
# Cop supports --auto-correct.
|
92
|
-
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
|
93
|
-
Style/TrivialAccessors:
|
94
|
-
Enabled: false
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Inch
|
2
|
-
module Evaluation
|
3
|
-
module Proxy
|
4
|
-
class ClassVariableObject < Base
|
5
|
-
protected
|
6
|
-
|
7
|
-
def relevant_roles
|
8
|
-
{
|
9
|
-
Role::ClassVariable::WithDoc => score_for(:docstring),
|
10
|
-
Role::ClassVariable::WithoutDoc => score_for(:docstring),
|
11
|
-
Role::ClassVariable::TaggedAsNodoc => nil,
|
12
|
-
Role::ClassVariable::Public => nil,
|
13
|
-
Role::ClassVariable::Private => nil
|
14
|
-
}
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
module Inch
|
2
|
-
module Evaluation
|
3
|
-
module Role
|
4
|
-
# Roles assigned to class variables
|
5
|
-
module ClassVariable
|
6
|
-
class WithDoc < Object::WithDoc
|
7
|
-
applicable_if :has_doc?
|
8
|
-
end
|
9
|
-
class WithoutDoc < Object::WithoutDoc
|
10
|
-
applicable_unless :has_doc?
|
11
|
-
end
|
12
|
-
|
13
|
-
class TaggedAsNodoc < Object::TaggedAsNodoc
|
14
|
-
applicable_if :nodoc?
|
15
|
-
end
|
16
|
-
class InRoot < Object::InRoot
|
17
|
-
applicable_if :in_root?
|
18
|
-
end
|
19
|
-
|
20
|
-
class Public < Object::Public
|
21
|
-
applicable_if :public?
|
22
|
-
|
23
|
-
def priority
|
24
|
-
-1
|
25
|
-
end
|
26
|
-
end
|
27
|
-
class Private < Object::Private
|
28
|
-
applicable_if :private?
|
29
|
-
|
30
|
-
def priority
|
31
|
-
-3
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
class WithCodeExample < Object::WithCodeExample
|
36
|
-
applicable_if do |o|
|
37
|
-
o.has_code_example? && !o.has_multiple_code_examples?
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
class WithMultipleCodeExamples < Object::WithMultipleCodeExamples
|
42
|
-
applicable_if :has_multiple_code_examples?
|
43
|
-
end
|
44
|
-
|
45
|
-
class WithoutCodeExample < Object::WithoutCodeExample
|
46
|
-
applicable_unless :has_code_example?
|
47
|
-
|
48
|
-
def suggestion
|
49
|
-
nil
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|