inch 0.4.0.rc3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70bd51c2792de8f8de939d1b92e67318997174b4
|
4
|
+
data.tar.gz: ac1341d81bbb6981245ef4c4e0c3c851dee8e686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2317879db99ade4706451160f728d5f2b8275045dc7a31fa967e847baf54596ef56eb73542829390d3a4dc785c26069c85fdf69e512ec883509ceeccd8fd5a95
|
7
|
+
data.tar.gz: 36fce8f28e4bb3fa3ff88a62dd6428dec5d869a8d53a603ae48ddd9cb93ad45e6e72db842fa8c7bd030e0ebdb80e5d1bd7f0985c8e66bf5bef86182d1d7b843b
|
@@ -28,22 +28,19 @@ module Inch
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def has_doc?
|
31
|
-
super && !implicit_docstring?
|
31
|
+
super && !implicit_docstring? || overload_tags.any? { |t| !t.docstring.empty? }
|
32
32
|
end
|
33
33
|
|
34
34
|
def method?
|
35
35
|
true
|
36
36
|
end
|
37
37
|
|
38
|
-
def overloaded?
|
39
|
-
end
|
40
|
-
|
41
38
|
def parameters
|
42
39
|
@parameters ||= all_parameter_names.map do |name|
|
43
40
|
signature_name = in_signature(name)
|
44
41
|
tag = parameter_tag(name) || parameter_tag(signature_name) ||
|
45
|
-
|
46
|
-
|
42
|
+
param_tag_in_overload_tags(name) ||
|
43
|
+
param_tag_in_overload_tags(signature_name)
|
47
44
|
MethodParameterObject.new(self, name, signature_name, tag)
|
48
45
|
end
|
49
46
|
end
|
@@ -67,11 +64,12 @@ module Inch
|
|
67
64
|
end
|
68
65
|
|
69
66
|
def return_mentioned?
|
70
|
-
|
67
|
+
!return_tags.empty? || docstring.mentions_return?
|
71
68
|
end
|
72
69
|
|
73
70
|
def return_described?
|
74
|
-
|
71
|
+
return_tags.any? { |t| !t.text.empty? } ||
|
72
|
+
docstring.describes_return?
|
75
73
|
end
|
76
74
|
|
77
75
|
def return_typed?
|
@@ -131,9 +129,15 @@ module Inch
|
|
131
129
|
end.flatten
|
132
130
|
end
|
133
131
|
|
134
|
-
def
|
135
|
-
overload_tags.
|
136
|
-
|
132
|
+
def param_tag_in_overload_tags(name)
|
133
|
+
overload_tags.map do |overload_tag|
|
134
|
+
find_param_tag(overload_tag, name)
|
135
|
+
end.first
|
136
|
+
end
|
137
|
+
|
138
|
+
def find_param_tag(overload_tag, name)
|
139
|
+
overload_tag.tags(:param).detect do |param_tag|
|
140
|
+
param_tag.name == name
|
137
141
|
end
|
138
142
|
end
|
139
143
|
|
@@ -151,8 +155,14 @@ module Inch
|
|
151
155
|
object.tags(:param)
|
152
156
|
end
|
153
157
|
|
154
|
-
def
|
155
|
-
object.tags(:return)
|
158
|
+
def return_tags
|
159
|
+
object.tags(:return) + overloaded_return_tags
|
160
|
+
end
|
161
|
+
|
162
|
+
def overloaded_return_tags
|
163
|
+
overload_tags.map do |overload_tag|
|
164
|
+
overload_tag.tag(:return)
|
165
|
+
end.compact
|
156
166
|
end
|
157
167
|
end
|
158
168
|
end
|
data/lib/inch/version.rb
CHANGED
@@ -49,6 +49,7 @@ module Overloading
|
|
49
49
|
# @raise [ArgumentError] if any parameter is the wrong type or out of bounds
|
50
50
|
def rgb(red, green, blue)
|
51
51
|
end
|
52
|
+
|
52
53
|
# Creates a {Sass::Script::Value::Color Color} from red, green, blue, and
|
53
54
|
# alpha values.
|
54
55
|
# @see #rgb
|
@@ -154,6 +155,21 @@ module Overloading
|
|
154
155
|
# @return [Hash<Symbol,Array<#call>>]
|
155
156
|
def hooks(name = nil)
|
156
157
|
end
|
158
|
+
|
159
|
+
# @overload identifiers(*identifiers)
|
160
|
+
#
|
161
|
+
# Sets the identifiers for this class.
|
162
|
+
#
|
163
|
+
# @param [Array<Symbol>] identifiers A list of identifiers to assign to
|
164
|
+
# this class.
|
165
|
+
#
|
166
|
+
# @return [void]
|
167
|
+
#
|
168
|
+
# @overload identifiers
|
169
|
+
#
|
170
|
+
# @return [Array<Symbol>] The identifiers for this class
|
171
|
+
def identifiers(*identifiers)
|
172
|
+
end
|
157
173
|
end
|
158
174
|
|
159
175
|
module YardError
|
@@ -277,6 +277,7 @@ describe ::Inch::CodeObject::Proxy::MethodObject do
|
|
277
277
|
list << @objects.find("Overloading#change_color")
|
278
278
|
list << @objects.find("Overloading#mix")
|
279
279
|
list << @objects.find("Overloading#hooks")
|
280
|
+
list << @objects.find("Overloading#identifiers")
|
280
281
|
list.each do |m|
|
281
282
|
assert_equal 100, m.score, "#{m.fullname} did not get 100"
|
282
283
|
end
|
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.0
|
4
|
+
version: 0.4.0
|
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-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -313,9 +313,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
313
313
|
version: '0'
|
314
314
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
315
315
|
requirements:
|
316
|
-
- - "
|
316
|
+
- - ">="
|
317
317
|
- !ruby/object:Gem::Version
|
318
|
-
version:
|
318
|
+
version: '0'
|
319
319
|
requirements: []
|
320
320
|
rubyforge_project:
|
321
321
|
rubygems_version: 2.2.2
|