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: be1d3023cb43e15c6a141ed20de1543d20a8be64
4
- data.tar.gz: 5c7c5638b7998464f36dcbae6016c5742d17e8d7
3
+ metadata.gz: 70bd51c2792de8f8de939d1b92e67318997174b4
4
+ data.tar.gz: ac1341d81bbb6981245ef4c4e0c3c851dee8e686
5
5
  SHA512:
6
- metadata.gz: 02501af74e5e84a9fbf0b25c69e9c319b46c2d35e8a9507ed97488917748bc3c98c9cecda89a1f704e0fd37633189d55ddfdb63e5877e1c34c8af4b65bbfc140
7
- data.tar.gz: f9c15371028b15ae3cb630d55cf0eff00e008296ca93f6cce4af98361430466760e5024712abd975b0341172c37d24f969b7a78b123a5c3975c4664dee96f4fe
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
- overload_tag_with_parameter(name)
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
- !!return_tag || docstring.mentions_return?
67
+ !return_tags.empty? || docstring.mentions_return?
71
68
  end
72
69
 
73
70
  def return_described?
74
- (return_tag && !return_tag.text.empty?) || docstring.describes_return?
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 overload_tag_with_parameter(name)
135
- overload_tags.detect do |tag|
136
- tag.parameters.map(&:first).include?(name)
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 return_tag
155
- object.tags(:return).first
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
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = "0.4.0.rc3"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -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.rc3
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-03-31 00:00:00.000000000 Z
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: 1.3.1
318
+ version: '0'
319
319
  requirements: []
320
320
  rubyforge_project:
321
321
  rubygems_version: 2.2.2