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.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2 -11
  3. data/Gemfile +2 -5
  4. data/README.md +1 -1
  5. data/Rakefile +2 -2
  6. data/bin/inch +3 -3
  7. data/config/defaults.rb +0 -7
  8. data/inch.gemspec +7 -7
  9. data/lib/inch.rb +9 -9
  10. data/lib/inch/api.rb +10 -10
  11. data/lib/inch/api/compare.rb +2 -2
  12. data/lib/inch/api/compare/code_objects.rb +3 -2
  13. data/lib/inch/api/compare/codebases.rb +1 -1
  14. data/lib/inch/api/diff.rb +10 -7
  15. data/lib/inch/api/filter.rb +1 -1
  16. data/lib/inch/api/get.rb +1 -1
  17. data/lib/inch/api/options/base.rb +4 -4
  18. data/lib/inch/api/options/filter.rb +4 -0
  19. data/lib/inch/api/options/suggest.rb +5 -1
  20. data/lib/inch/api/stats.rb +1 -0
  21. data/lib/inch/api/suggest.rb +10 -9
  22. data/lib/inch/cli.rb +6 -6
  23. data/lib/inch/cli/arguments.rb +2 -2
  24. data/lib/inch/cli/command.rb +15 -15
  25. data/lib/inch/cli/command/base.rb +4 -4
  26. data/lib/inch/cli/command/console.rb +5 -5
  27. data/lib/inch/cli/command/diff.rb +8 -7
  28. data/lib/inch/cli/command/inspect.rb +4 -5
  29. data/lib/inch/cli/command/list.rb +4 -4
  30. data/lib/inch/cli/command/options/base.rb +8 -8
  31. data/lib/inch/cli/command/options/base_list.rb +5 -9
  32. data/lib/inch/cli/command/options/console.rb +3 -4
  33. data/lib/inch/cli/command/options/diff.rb +6 -8
  34. data/lib/inch/cli/command/options/inspect.rb +2 -2
  35. data/lib/inch/cli/command/options/list.rb +2 -3
  36. data/lib/inch/cli/command/options/show.rb +2 -2
  37. data/lib/inch/cli/command/options/stats.rb +1 -2
  38. data/lib/inch/cli/command/options/suggest.rb +3 -6
  39. data/lib/inch/cli/command/output/base.rb +6 -4
  40. data/lib/inch/cli/command/output/console.rb +5 -4
  41. data/lib/inch/cli/command/output/diff.rb +6 -6
  42. data/lib/inch/cli/command/output/inspect.rb +8 -6
  43. data/lib/inch/cli/command/output/list.rb +1 -0
  44. data/lib/inch/cli/command/output/show.rb +5 -4
  45. data/lib/inch/cli/command/output/stats.rb +21 -21
  46. data/lib/inch/cli/command/output/suggest.rb +27 -30
  47. data/lib/inch/cli/command/show.rb +4 -4
  48. data/lib/inch/cli/command/stats.rb +4 -4
  49. data/lib/inch/cli/command/suggest.rb +6 -6
  50. data/lib/inch/cli/command_parser.rb +5 -6
  51. data/lib/inch/cli/sparkline_helper.rb +6 -6
  52. data/lib/inch/cli/trace_helper.rb +1 -1
  53. data/lib/inch/cli/yardopts_helper.rb +3 -4
  54. data/lib/inch/code_object.rb +3 -3
  55. data/lib/inch/code_object/converter.rb +8 -6
  56. data/lib/inch/code_object/provider.rb +1 -1
  57. data/lib/inch/code_object/provider/yard.rb +12 -10
  58. data/lib/inch/code_object/provider/yard/docstring.rb +19 -51
  59. data/lib/inch/code_object/provider/yard/nodoc_helper.rb +4 -4
  60. data/lib/inch/code_object/provider/yard/object.rb +10 -12
  61. data/lib/inch/code_object/provider/yard/object/base.rb +27 -48
  62. data/lib/inch/code_object/provider/yard/object/method_object.rb +10 -47
  63. data/lib/inch/code_object/provider/yard/object/method_parameter_object.rb +6 -10
  64. data/lib/inch/code_object/provider/yard/object/method_signature.rb +8 -12
  65. data/lib/inch/code_object/provider/yard/object/namespace_object.rb +4 -1
  66. data/lib/inch/code_object/provider/yard/parser.rb +3 -3
  67. data/lib/inch/code_object/proxy.rb +9 -10
  68. data/lib/inch/code_object/proxy/base.rb +10 -12
  69. data/lib/inch/code_object/proxy/method_object.rb +2 -3
  70. data/lib/inch/code_object/proxy/method_parameter_object.rb +3 -5
  71. data/lib/inch/codebase.rb +5 -4
  72. data/lib/inch/codebase/objects_filter.rb +4 -2
  73. data/lib/inch/codebase/serializer.rb +3 -3
  74. data/lib/inch/config.rb +2 -2
  75. data/lib/inch/config/base.rb +1 -0
  76. data/lib/inch/config/codebase.rb +4 -4
  77. data/lib/inch/core_ext.rb +1 -1
  78. data/lib/inch/core_ext/string.rb +1 -1
  79. data/lib/inch/evaluation.rb +15 -16
  80. data/lib/inch/evaluation/file.rb +1 -1
  81. data/lib/inch/evaluation/grade_list.rb +2 -2
  82. data/lib/inch/evaluation/object_schema.rb +1 -1
  83. data/lib/inch/evaluation/proxy.rb +7 -8
  84. data/lib/inch/evaluation/proxy/base.rb +10 -13
  85. data/lib/inch/evaluation/proxy/constant_object.rb +1 -1
  86. data/lib/inch/evaluation/proxy/method_object.rb +5 -12
  87. data/lib/inch/evaluation/proxy/module_object.rb +1 -1
  88. data/lib/inch/evaluation/proxy/namespace_object.rb +1 -1
  89. data/lib/inch/evaluation/role/base.rb +1 -1
  90. data/lib/inch/evaluation/role/method.rb +2 -2
  91. data/lib/inch/evaluation/role/method_parameter.rb +1 -2
  92. data/lib/inch/evaluation/role/object.rb +2 -2
  93. data/lib/inch/rake.rb +2 -2
  94. data/lib/inch/rake/suggest.rb +2 -3
  95. data/lib/inch/utils/shell_helper.rb +1 -1
  96. data/lib/inch/utils/ui.rb +5 -5
  97. data/lib/inch/utils/weighted_list.rb +3 -2
  98. data/lib/inch/version.rb +1 -1
  99. data/test/fixtures/simple/lib/broken.rb +7 -35
  100. data/test/fixtures/simple/lib/foo.rb +1 -22
  101. data/test/integration/api/compare/codebases.rb +1 -1
  102. data/test/integration/cli/command/console_test.rb +5 -5
  103. data/test/integration/cli/command/inspect_test.rb +5 -4
  104. data/test/integration/cli/command/list_test.rb +4 -3
  105. data/test/integration/cli/command/show_test.rb +4 -4
  106. data/test/integration/cli/command/stats_test.rb +2 -2
  107. data/test/integration/cli/command/suggest_test.rb +10 -10
  108. data/test/integration/stats_options_test.rb +3 -3
  109. data/test/integration/visibility_options_test.rb +13 -13
  110. data/test/shared/base_list.rb +3 -4
  111. data/test/test_helper.rb +6 -16
  112. data/test/unit/api/filter_test.rb +7 -7
  113. data/test/unit/api/get_test.rb +1 -1
  114. data/test/unit/api/list_test.rb +1 -1
  115. data/test/unit/api/options/base_test.rb +3 -3
  116. data/test/unit/api/stats_test.rb +1 -1
  117. data/test/unit/api/suggest_test.rb +3 -3
  118. data/test/unit/cli/arguments_test.rb +1 -1
  119. data/test/unit/cli/command/base_test.rb +1 -1
  120. data/test/unit/cli/command/options/base_list_test.rb +2 -2
  121. data/test/unit/cli/command/options/base_object_test.rb +1 -1
  122. data/test/unit/cli/command/options/base_test.rb +1 -1
  123. data/test/unit/cli/command_parser_test.rb +2 -2
  124. data/test/unit/cli/trace_helper_test.rb +1 -1
  125. data/test/unit/cli/yardopts_helper_test.rb +3 -4
  126. data/test/unit/code_object/converter_test.rb +1 -1
  127. data/test/unit/code_object/provider/yard/docstring_test.rb +28 -106
  128. data/test/unit/code_object/provider/yard/nodoc_helper_test.rb +5 -6
  129. data/test/unit/code_object/provider/yard/object/method_object_test.rb +10 -20
  130. data/test/unit/code_object/provider/yard_test.rb +4 -4
  131. data/test/unit/code_object/provider_test.rb +1 -1
  132. data/test/unit/code_object/proxy/method_object_test.rb +262 -382
  133. data/test/unit/code_object/proxy_test.rb +1 -1
  134. data/test/unit/codebase/objects_test.rb +2 -2
  135. data/test/unit/codebase/proxy_test.rb +1 -1
  136. data/test/unit/config/codebase_test.rb +1 -1
  137. data/test/unit/evaluation/role/base_test.rb +2 -2
  138. data/test/unit/utils/ui_test.rb +4 -4
  139. data/test/unit/utils/weighted_list_test.rb +4 -7
  140. metadata +4 -14
  141. data/.rubocop.yml +0 -15
  142. data/.rubocop_todo.yml +0 -94
  143. data/lib/inch/code_object/provider/yard/object/class_variable_object.rb +0 -12
  144. data/lib/inch/code_object/proxy/class_variable_object.rb +0 -8
  145. data/lib/inch/evaluation/proxy/class_variable_object.rb +0 -19
  146. data/lib/inch/evaluation/role/class_variable.rb +0 -55
  147. data/test/fixtures/simple/lib/broken_ruby_2_0_features.rb +0 -7
  148. data/test/fixtures/simple/lib/directives.rb +0 -8
@@ -4,6 +4,7 @@ module Inch
4
4
  # @see config/defaults.rb
5
5
  class Config
6
6
  class Base
7
+
7
8
  def update(&block)
8
9
  instance_eval(&block)
9
10
  end
@@ -27,7 +27,7 @@ module Inch
27
27
  end
28
28
 
29
29
  def update_via_yaml(dir)
30
- if (yaml = self.class.yaml(dir))
30
+ if yaml = self.class.yaml(dir)
31
31
  Dir.chdir(dir) do
32
32
  update_files yaml["files"]
33
33
  end
@@ -57,9 +57,9 @@ module Inch
57
57
 
58
58
  def update_files(files)
59
59
  return if files.nil?
60
- @included_files = expand_files(files["included"]) if files["included"]
61
- @excluded_files = expand_files(files["excluded"]) if files["excluded"]
60
+ include_files expand_files(files["included"]) if files["included"]
61
+ exclude_files expand_files(files["excluded"]) if files["excluded"]
62
62
  end
63
63
  end
64
64
  end
65
- end
65
+ end
@@ -1 +1 @@
1
- require "inch/core_ext/string"
1
+ require 'inch/core_ext/string'
@@ -1,3 +1,3 @@
1
- require "term/ansicolor"
1
+ require 'term/ansicolor'
2
2
 
3
3
  String.send(:include, Term::ANSIColor)
@@ -9,27 +9,26 @@ module Inch
9
9
  private
10
10
 
11
11
  def self.class_for(code_object)
12
- class_name = code_object.class.to_s.split("::").last
12
+ class_name = code_object.class.to_s.split('::').last
13
13
  const_get(class_name)
14
14
  end
15
15
  end
16
16
  end
17
17
 
18
- require "inch/utils/read_write_methods"
18
+ require 'inch/utils/read_write_methods'
19
19
 
20
- require "inch/evaluation/file"
21
- require "inch/evaluation/grade"
22
- require "inch/evaluation/grade_list"
23
- require "inch/evaluation/object_schema"
24
- require "inch/evaluation/priority_range"
20
+ require 'inch/evaluation/file'
21
+ require 'inch/evaluation/grade'
22
+ require 'inch/evaluation/grade_list'
23
+ require 'inch/evaluation/object_schema'
24
+ require 'inch/evaluation/priority_range'
25
25
 
26
- require "inch/evaluation/role/base"
27
- require "inch/evaluation/role/missing"
28
- require "inch/evaluation/role/object"
29
- require "inch/evaluation/role/method"
30
- require "inch/evaluation/role/method_parameter"
31
- require "inch/evaluation/role/namespace"
32
- require "inch/evaluation/role/constant"
33
- require "inch/evaluation/role/class_variable"
26
+ require 'inch/evaluation/role/base'
27
+ require 'inch/evaluation/role/missing'
28
+ require 'inch/evaluation/role/object'
29
+ require 'inch/evaluation/role/method'
30
+ require 'inch/evaluation/role/method_parameter'
31
+ require 'inch/evaluation/role/namespace'
32
+ require 'inch/evaluation/role/constant'
34
33
 
35
- require "inch/evaluation/proxy"
34
+ require 'inch/evaluation/proxy'
@@ -50,7 +50,7 @@ module Inch
50
50
  class << self
51
51
  def for(filename, objects)
52
52
  @cache ||= {}
53
- if (file = @cache[filename])
53
+ if file = @cache[filename]
54
54
  file
55
55
  else
56
56
  @cache[filename] = new(filename, objects)
@@ -6,8 +6,8 @@ module Inch
6
6
  class GradeList < Struct.new(:grade)
7
7
  extend Forwardable
8
8
 
9
- def_delegators :grade,
10
- :scores, :label, :color, :bg_color, :to_s, :to_sym
9
+ def_delegators :grade, :scores, :label, :color, :bg_color,
10
+ :to_s, :to_sym
11
11
 
12
12
  # Returns code_objects that received a score with the defined +scores+
13
13
  attr_reader :objects
@@ -13,7 +13,7 @@ module Inch
13
13
  code_example_single
14
14
  code_example_multi
15
15
  unconsidered_tag
16
- )
16
+ )
17
17
 
18
18
  attr_reader :object
19
19
 
@@ -10,17 +10,16 @@ module Inch
10
10
  private
11
11
 
12
12
  def self.class_for(code_object)
13
- class_name = code_object.class.to_s.split("::").last
13
+ class_name = code_object.class.to_s.split('::').last
14
14
  const_get(class_name)
15
15
  end
16
16
  end
17
17
  end
18
18
  end
19
19
 
20
- require "inch/evaluation/proxy/base"
21
- require "inch/evaluation/proxy/namespace_object"
22
- require "inch/evaluation/proxy/class_object"
23
- require "inch/evaluation/proxy/class_variable_object"
24
- require "inch/evaluation/proxy/constant_object"
25
- require "inch/evaluation/proxy/method_object"
26
- require "inch/evaluation/proxy/module_object"
20
+ require 'inch/evaluation/proxy/base'
21
+ require 'inch/evaluation/proxy/namespace_object'
22
+ require 'inch/evaluation/proxy/class_object'
23
+ require 'inch/evaluation/proxy/constant_object'
24
+ require 'inch/evaluation/proxy/method_object'
25
+ require 'inch/evaluation/proxy/module_object'
@@ -67,7 +67,9 @@ module Inch
67
67
  end
68
68
 
69
69
  # @return [Array<Evaluation::Role::Base>]
70
- attr_reader :roles
70
+ def roles
71
+ @roles
72
+ end
71
73
 
72
74
  protected
73
75
 
@@ -93,19 +95,13 @@ module Inch
93
95
  Role::Object::WithDoc => score_for(:docstring),
94
96
  Role::Object::WithoutDoc => score_for(:docstring),
95
97
  Role::Object::WithCodeExample => score_for(:code_example_single),
96
- Role::Object::WithMultipleCodeExamples =>
97
- score_for(:code_example_multi),
98
+ Role::Object::WithMultipleCodeExamples => score_for(:code_example_multi),
98
99
  Role::Object::WithoutCodeExample => score_for(:code_example_single),
99
100
  Role::Object::Tagged => score_for_unconsidered_tags,
100
101
  Role::Object::TaggedAsAPI => nil,
101
102
  Role::Object::TaggedAsInternalAPI => nil,
102
103
  Role::Object::TaggedAsPrivate => nil,
103
- Role::Object::Alias =>
104
- if object.alias?
105
- object.aliased_object.score
106
- else
107
- nil
108
- end
104
+ Role::Object::Alias => object.alias? ? object.aliased_object.score : nil,
109
105
  }
110
106
  end
111
107
 
@@ -128,8 +124,9 @@ module Inch
128
124
 
129
125
  def __evaluate(object, role_classes)
130
126
  role_classes.each do |role_class, score|
131
- next unless role_class.applicable?(object)
132
- add_role role_class.new(object, score)
127
+ if role_class.applicable?(object)
128
+ add_role role_class.new(object, score)
129
+ end
133
130
  end
134
131
  end
135
132
 
@@ -147,7 +144,7 @@ module Inch
147
144
 
148
145
  # @return [Float]
149
146
  def __score
150
- value = @roles.reduce(0) { |sum, r| sum + r.score.to_f }.to_i
147
+ value = @roles.inject(0) { |sum,r| sum + r.score.to_f }.to_i
151
148
  if value < min_score
152
149
  min_score
153
150
  elsif value > max_score
@@ -159,7 +156,7 @@ module Inch
159
156
 
160
157
  # @return [Fixnum]
161
158
  def __priority
162
- @roles.reduce(0) { |sum, r| sum + r.priority.to_i }
159
+ @roles.inject(0) { |sum,r| sum + r.priority.to_i }
163
160
  end
164
161
  end
165
162
  end
@@ -10,7 +10,7 @@ module Inch
10
10
  Role::Constant::WithoutDoc => score_for(:docstring),
11
11
  Role::Constant::TaggedAsNodoc => nil,
12
12
  Role::Constant::Public => nil,
13
- Role::Constant::Private => nil
13
+ Role::Constant::Private => nil,
14
14
  }
15
15
  end
16
16
  end
@@ -29,24 +29,17 @@ module Inch
29
29
  Role::Method::Constructor => nil,
30
30
  Role::Method::Getter => nil,
31
31
  Role::Method::Setter => nil,
32
- Role::Method::Overridden =>
33
- if object.overridden?
34
- object.overridden_method.score
35
- else
36
- nil
37
- end,
32
+ Role::Method::Overridden => object.overridden? ? object.overridden_method.score : nil,
38
33
  Role::Method::WithManyLines => nil,
39
34
  Role::Method::WithBangName => nil,
40
35
  Role::Method::WithQuestioningName => nil,
41
36
  Role::Method::HasAlias => nil,
42
37
  Role::Method::WithReturnType => score_for(:return_type),
43
38
  Role::Method::WithoutReturnType => score_for(:return_type),
44
- Role::Method::WithReturnDescription =>
45
- score_for(:return_description),
46
- Role::Method::WithoutReturnDescription =>
47
- score_for(:return_description),
39
+ Role::Method::WithReturnDescription => score_for(:return_description),
40
+ Role::Method::WithoutReturnDescription => score_for(:return_description),
48
41
  Role::Method::WithoutParameters => score_for(:parameters),
49
- Role::Method::WithManyParameters => nil
42
+ Role::Method::WithManyParameters => nil,
50
43
  }
51
44
  end
52
45
 
@@ -59,7 +52,7 @@ module Inch
59
52
  Role::MethodParameter::WithoutType => per_param * 0.5,
60
53
  Role::MethodParameter::WithBadName => nil,
61
54
  Role::MethodParameter::Block => nil,
62
- Role::MethodParameter::Splat => nil
55
+ Role::MethodParameter::Splat => nil,
63
56
  }
64
57
  end
65
58
 
@@ -5,4 +5,4 @@ module Inch
5
5
  end
6
6
  end
7
7
  end
8
- end
8
+ end
@@ -18,7 +18,7 @@ module Inch
18
18
  Role::Namespace::WithChildren => nil,
19
19
  Role::Namespace::WithManyChildren => nil,
20
20
  Role::Namespace::WithoutMethods => nil,
21
- Role::Namespace::Pure => nil
21
+ Role::Namespace::Pure => nil,
22
22
  }
23
23
  end
24
24
  end
@@ -84,7 +84,7 @@ module Inch
84
84
  end
85
85
 
86
86
  def object_type
87
- object.class.to_s.split("::").last.gsub(/Object$/, "").downcase
87
+ object.class.to_s.split('::').last.gsub(/Object$/, '').downcase
88
88
  end
89
89
  end
90
90
  end
@@ -32,8 +32,7 @@ module Inch
32
32
  end
33
33
  end
34
34
 
35
- # Role assigned to methods where the return value is decribed in the
36
- # docs
35
+ # Role assigned to methods where the return value is decribed in the docs
37
36
  class WithReturnDescription < Base
38
37
  applicable_if :return_described?
39
38
  end
@@ -47,6 +46,7 @@ module Inch
47
46
  end
48
47
  end
49
48
 
49
+
50
50
  # Role assigned to methods with many lines
51
51
  #
52
52
  # @see CodeObject::Proxy::MethodObject#has_many_lines?
@@ -67,8 +67,7 @@ module Inch
67
67
  applicable_if :wrongly_mentioned?
68
68
 
69
69
  def suggestion
70
- "The parameter '#{object.name}' seems not to be part of the " \
71
- "signature."
70
+ "The parameter '#{object.name}' seems not to be part of the signature."
72
71
  end
73
72
 
74
73
  def priority
@@ -53,8 +53,8 @@ module Inch
53
53
  end
54
54
 
55
55
  # Role assigned to objects explicitly or implicitly tagged to be part
56
- # of an API. If the API is 'private'/'internal' TaggedAsInternalAPI is
57
- # assigned instead.
56
+ # of an API. If the API is 'private'/'internal' TaggedAsInternalAPI is assigned
57
+ # instead.
58
58
  class TaggedAsAPI < Base
59
59
  applicable_if :api_tag?
60
60
  end
@@ -1,2 +1,2 @@
1
- require "inch"
2
- require "inch/rake/suggest"
1
+ require 'inch'
2
+ require 'inch/rake/suggest'
@@ -1,8 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- require "rake"
4
- require "rake/tasklib"
5
- require "inch/cli"
3
+ require 'rake'
4
+ require 'rake/tasklib'
6
5
 
7
6
  module Inch
8
7
  # Holds all Rake tasks
@@ -3,7 +3,7 @@ module Inch
3
3
  module ShellHelper
4
4
  def git(dir, command)
5
5
  Dir.chdir(dir) do
6
- sh("git #{command}")
6
+ out = sh("git #{command}")
7
7
  end
8
8
  end
9
9
 
@@ -10,9 +10,9 @@ module Inch
10
10
  end
11
11
 
12
12
  def debug(msg)
13
- return unless ENV["DEBUG"]
13
+ return unless ENV['DEBUG']
14
14
  msg.to_s.lines.each do |line|
15
- trace edged :dark, line.gsub(/\n$/, "").dark
15
+ trace edged :dark, line.gsub(/\n$/,'').dark
16
16
  end
17
17
  end
18
18
 
@@ -45,12 +45,12 @@ module Inch
45
45
  def header(text, color, bg_color = nil)
46
46
  @current_header_color = color
47
47
  trace __header(text, color, bg_color)
48
- trace unless use_color?
48
+ trace if !use_color?
49
49
  end
50
50
 
51
51
  # @return [Boolean] true if the UI uses coloring
52
52
  def use_color?
53
- Term::ANSIColor.coloring?
53
+ Term::ANSIColor::coloring?
54
54
  end
55
55
 
56
56
  private
@@ -61,7 +61,7 @@ module Inch
61
61
 
62
62
  def __header(text, color, bg_color = nil)
63
63
  bg_color ||= "intense_#{color}"
64
- bar = " #{text}".ljust(CLI::COLUMNS - 1)
64
+ bar = " #{text}".ljust(CLI::COLUMNS-1)
65
65
  .on_color(bg_color).color(:color16)
66
66
  "#".color(color).on_color(color) + bar
67
67
  end
@@ -74,8 +74,9 @@ module Inch
74
74
  target_count = @max_counts[index]
75
75
  @list[index].concat sublist[0...target_count]
76
76
 
77
- next unless sublist.size < target_count
78
- missing += target_count - sublist.size
77
+ if sublist.size < target_count
78
+ missing += target_count - sublist.size
79
+ end
79
80
  end
80
81
  missing
81
82
  end
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = "0.4.10"
2
+ VERSION = "0.5.0.rc1"
3
3
  end
@@ -1,7 +1,4 @@
1
1
  module Foo
2
- # Determines :class_variable
3
- @@class_variable = {Ace: 11, Jack: 10, Queen: 10, King: 10}
4
-
5
2
  # The problem here is that the @param tag is not given the name of the
6
3
  # parameter it documents.
7
4
  #
@@ -18,6 +15,13 @@ module Foo
18
15
  def method_with_empty_param_tag_text(e)
19
16
  end
20
17
 
18
+ # The problem here is that ...
19
+ #
20
+ # @param *names [Array]
21
+ # @return [String]
22
+ def method_with_splat_parameter(*names)
23
+ end
24
+
21
25
  # The problem here is that ...
22
26
  #
23
27
  # @param names [Array]
@@ -30,41 +34,9 @@ module Foo
30
34
  # @return HasH
31
35
  def method_with_wrong_return_tag
32
36
  end
33
-
34
- # The problem here is that ...
35
- #
36
- # @param *names [Array]
37
- # @return [String]
38
- def method_with_splat_parameter(*names)
39
- end
40
-
41
- # Initializes a new Connection instance
42
- # @param [Hash<Symbol, >] params One or more optional params
43
- # @option params [String] :body Default text to be sent over a socket. Only used if :body absent in Connection#request params
44
- # @option params [Hash<Symbol, String>] :headers The default headers to supply in a request. Only used if params[:headers] is not supplied to Connection#request
45
- def method_with_indented_param_tag(params = {})
46
- end
47
37
  end
48
38
 
49
39
  module Overloading
50
- # @overload many_overloads(&block)
51
- # @overload many_overloads(scope, &block)
52
- # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to `:example`)
53
- # @overload many_overloads(scope, conditions, &block)
54
- # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to `:example`)
55
- # @param conditions [Hash]
56
- # constrains this hook to examples matching these conditions e.g.
57
- # `many_overloads(:example, :ui => true) { ... }` will only run with examples or
58
- # groups declared with `:ui => true`.
59
- # @overload many_overloads(conditions, &block)
60
- # @param conditions [Hash]
61
- # constrains this hook to examples matching these conditions e.g.
62
- # `many_overloads(:example, :ui => true) { ... }` will only run with examples or
63
- # groups declared with `:ui => true`.
64
- def many_overloads(*args, &block)
65
- hooks.register :append, :before, *args, &block
66
- end
67
-
68
40
  # Creates a {Sass::Script::Value::Color Color} object from red, green, and
69
41
  # blue values.
70
42
  #