yard-tomdoc 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/.index CHANGED
@@ -57,10 +57,10 @@ customs: []
57
57
  paths:
58
58
  lib:
59
59
  - lib
60
- version: 0.7.0
60
+ version: 0.7.1
61
61
  name: yard-tomdoc
62
62
  title: YARD TomDoc
63
63
  summary: TomDoc for YARD
64
64
  description: Use TomDoc documentation format with YARD.
65
65
  webcvs: https://github.com/rubyworks/yard-tomdoc/tree/master
66
- date: '2013-02-11'
66
+ date: '2013-02-16'
data/HISTORY.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # RELEASE HISTORY
2
2
 
3
+ ## 0.7.1 / 2013-02-16
4
+
5
+ This release add support for "Returns nothing" being translated
6
+ into `@return [void]`. And adds support for putting the return
7
+ type at the end of the description if no other return clauses are
8
+ specificed. This is especially useful for attributes.
9
+
10
+ Changes:
11
+
12
+ * Add support for returns nothing.
13
+ * Add support for description only return type.
14
+
15
+
3
16
  ## 0.7.0 / 2013-02-12
4
17
 
5
18
  New major release uses the new major release of TomParse.
@@ -34,8 +34,17 @@ module YARD
34
34
 
35
35
  tomdoc.raises.each {|r| yard.create_tag(:raise, r.sub(/\ARaises\s+/, '')) }
36
36
 
37
+ if tomdoc.returns.empty?
38
+ if md = /\[(.*?)\]\s*\Z/.match(tomdoc.description)
39
+ klass = md[1]
40
+ yard.create_tag(:return, "[#{klass}]")
41
+ end
42
+ end
43
+
37
44
  tomdoc.returns.each do |r|
38
- if md = /\[(.*?)\]\Z/.match(r)
45
+ if md = /\AReturn(s)?\ nothing(\.)?\Z/.match(r)
46
+ yard.create_tag(:return, "[void]")
47
+ elsif md = /\[(.*?)\]\Z/.match(r)
39
48
  klass = md[1]
40
49
  desc = md.pre_match
41
50
  yard.create_tag(:return, "[#{klass}] #{desc}")
@@ -57,10 +57,10 @@ customs: []
57
57
  paths:
58
58
  lib:
59
59
  - lib
60
- version: 0.7.0
60
+ version: 0.7.1
61
61
  name: yard-tomdoc
62
62
  title: YARD TomDoc
63
63
  summary: TomDoc for YARD
64
64
  description: Use TomDoc documentation format with YARD.
65
65
  webcvs: https://github.com/rubyworks/yard-tomdoc/tree/master
66
- date: '2013-02-11'
66
+ date: '2013-02-16'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-tomdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-11 00:00:00.000000000 Z
13
+ date: 2013-02-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yard