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
data/lib/inch/config/base.rb
CHANGED
data/lib/inch/config/codebase.rb
CHANGED
@@ -27,7 +27,7 @@ module Inch
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def update_via_yaml(dir)
|
30
|
-
if
|
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
|
-
|
61
|
-
|
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
|
data/lib/inch/core_ext.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require 'inch/core_ext/string'
|
data/lib/inch/core_ext/string.rb
CHANGED
data/lib/inch/evaluation.rb
CHANGED
@@ -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(
|
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
|
18
|
+
require 'inch/utils/read_write_methods'
|
19
19
|
|
20
|
-
require
|
21
|
-
require
|
22
|
-
require
|
23
|
-
require
|
24
|
-
require
|
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
|
27
|
-
require
|
28
|
-
require
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
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
|
34
|
+
require 'inch/evaluation/proxy'
|
data/lib/inch/evaluation/file.rb
CHANGED
@@ -6,8 +6,8 @@ module Inch
|
|
6
6
|
class GradeList < Struct.new(:grade)
|
7
7
|
extend Forwardable
|
8
8
|
|
9
|
-
def_delegators :grade,
|
10
|
-
|
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
|
@@ -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(
|
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
|
21
|
-
require
|
22
|
-
require
|
23
|
-
require
|
24
|
-
require
|
25
|
-
require
|
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
|
-
|
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
|
-
|
132
|
-
|
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.
|
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.
|
159
|
+
@roles.inject(0) { |sum,r| sum + r.priority.to_i }
|
163
160
|
end
|
164
161
|
end
|
165
162
|
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
|
-
|
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
|
|
@@ -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?
|
@@ -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
|
-
#
|
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
|
data/lib/inch/rake.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'inch'
|
2
|
+
require 'inch/rake/suggest'
|
data/lib/inch/rake/suggest.rb
CHANGED
data/lib/inch/utils/ui.rb
CHANGED
@@ -10,9 +10,9 @@ module Inch
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def debug(msg)
|
13
|
-
return unless ENV[
|
13
|
+
return unless ENV['DEBUG']
|
14
14
|
msg.to_s.lines.each do |line|
|
15
|
-
trace edged :dark, line.gsub(/\n$/,
|
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
|
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
|
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
|
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
|
-
|
78
|
-
|
77
|
+
if sublist.size < target_count
|
78
|
+
missing += target_count - sublist.size
|
79
|
+
end
|
79
80
|
end
|
80
81
|
missing
|
81
82
|
end
|
data/lib/inch/version.rb
CHANGED
@@ -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
|
#
|