yard-markdown 0.3.5 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/example/Aquatic.md +20 -0
- data/example/Fish.md +35 -0
- data/example/Salmon.md +58 -0
- data/example/index.csv +19 -20
- data/example_yard.rb +154 -0
- data/templates/default/fulldoc/markdown/setup.rb +53 -3
- metadata +22 -9
- data/example/Bird.md +0 -38
- data/example/Duck.md +0 -57
- data/example/Waterfowl.md +0 -19
- data/example/YARD/Markdown.md +0 -10
- data/example/YARD.md +0 -10
- /data/{example.rb → example_rdoc.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3df94167400db27cf5f4262cc1ac0b800b36108356092de9cb7329805ea113e4
|
4
|
+
data.tar.gz: e962872fd8536827202d6488497ef698bf7484a95880d0539edb6f6428546d32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08cddd7156921c807a951fe1774857178be755bf915cea81fa3c288bdc8e3b8f2a9c66fd5bf7a2b5ea1db33729e8524b95c400ec8f049dc49887fdac279b2f35'
|
7
|
+
data.tar.gz: 86f49d74fd82a79e31acaf8524d473eea7d96fac7012975fc957bff4d9f88101f6ca65ca51e9d0da348a789c6c09c1803806f34b4123c17308f04762875884b5
|
data/README.md
CHANGED
@@ -31,4 +31,8 @@ This is a successor to [rdoc-mardown gem](https://github.com/skatkov/rdoc-markdo
|
|
31
31
|
## Testing
|
32
32
|
Unit tests can't really test this gem properly. So it's semi-manual process of making changes and reviewing output.
|
33
33
|
|
34
|
-
|
34
|
+
Testing Rdoc conversion to markdown:
|
35
|
+
`yardoc example_rdoc.rb` -> outputs everything into example/ folder.
|
36
|
+
|
37
|
+
Testing Yard conversion to markdown:
|
38
|
+
`yardoc example_yard.rb` -> outputs everything into example/ folder.
|
data/example/Aquatic.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Module: Aquatic
|
2
|
+
|
3
|
+
**Defined in:** example_yard.rb
|
4
|
+
|
5
|
+
A mixin for aquatic creatures.
|
6
|
+
|
7
|
+
# Public Instance Methods
|
8
|
+
## swim() [](#method-i-swim)
|
9
|
+
Swim in the water.
|
10
|
+
|
11
|
+
**return** [void]
|
12
|
+
|
13
|
+
|
14
|
+
# Constants
|
15
|
+
## DEFAULT_SALMON_SPEED [](#constant-DEFAULT_SALMON_SPEED)
|
16
|
+
|
17
|
+
|
18
|
+
## MAX_DEPTH [](#constant-MAX_DEPTH)
|
19
|
+
|
20
|
+
|
data/example/Fish.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Class: Fish
|
2
|
+
**Inherits:** Object
|
3
|
+
|
4
|
+
**Defined in:** example_yard.rb
|
5
|
+
|
6
|
+
The base class for all fish.
|
7
|
+
|
8
|
+
# Public Instance Methods
|
9
|
+
## make_sound() [](#method-i-make_sound)
|
10
|
+
Make a sound.
|
11
|
+
|
12
|
+
**return** [void]
|
13
|
+
**yield** [sound] The sound produced by the fish
|
14
|
+
**yieldparam** [String] The actual sound
|
15
|
+
## swim(direction, speed) [](#method-i-swim)
|
16
|
+
Swim in a specific direction.
|
17
|
+
|
18
|
+
Swimming is the most critical feature of fish.
|
19
|
+
|
20
|
+
**param** [Symbol, String] The direction to swim
|
21
|
+
**param** [Integer] The speed at which to swim
|
22
|
+
**return** [Boolean] Whether the swim was successful
|
23
|
+
|
24
|
+
**example**
|
25
|
+
```ruby
|
26
|
+
swim(:north, 30)
|
27
|
+
```
|
28
|
+
|
29
|
+
# Constants
|
30
|
+
## DEFAULT_SALMON_SPEED [](#constant-DEFAULT_SALMON_SPEED)
|
31
|
+
|
32
|
+
|
33
|
+
## MAX_DEPTH [](#constant-MAX_DEPTH)
|
34
|
+
|
35
|
+
|
data/example/Salmon.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Class: Salmon
|
2
|
+
**Inherits:** Fish
|
3
|
+
|
4
|
+
**Includes:** Aquatic
|
5
|
+
|
6
|
+
**Defined in:** example_yard.rb
|
7
|
+
|
8
|
+
A salmon is an Aquatic Fish.
|
9
|
+
|
10
|
+
## Features
|
11
|
+
|
12
|
+
* **Fish**
|
13
|
+
* make_sound
|
14
|
+
* swim
|
15
|
+
* **Aquatic**
|
16
|
+
* swim (overridden)
|
17
|
+
|
18
|
+
# Public Instance Methods
|
19
|
+
## initialize(farmed, wild) [](#method-i-initialize)
|
20
|
+
Creates a new salmon.
|
21
|
+
|
22
|
+
**param** [Boolean] Whether the salmon is farmed
|
23
|
+
**param** [Boolean] Whether the salmon is wild
|
24
|
+
**return** [Salmon] a new instance of Salmon
|
25
|
+
## make_sound() [](#method-i-make_sound)
|
26
|
+
Salmon overrides generic implementation.
|
27
|
+
|
28
|
+
**return** [void]
|
29
|
+
**yield** [sound] The sound produced by the salmon
|
30
|
+
**yieldparam** [String] The actual sound
|
31
|
+
## sustainable?() [](#method-i-sustainable?)
|
32
|
+
Checks if this salmon is sustainable.
|
33
|
+
|
34
|
+
**return** [Boolean] Whether the salmon is sustainable
|
35
|
+
## swim() [](#method-i-swim)
|
36
|
+
Swim in the water.
|
37
|
+
|
38
|
+
**return** [void]
|
39
|
+
|
40
|
+
# Public Class Methods
|
41
|
+
## wild_salmon() [](#method-c-wild_salmon)
|
42
|
+
**return** [Array<Salmon>] List of all wild salmon
|
43
|
+
|
44
|
+
# Attributes
|
45
|
+
## farmed[RW] [](#attribute-i-farmed)
|
46
|
+
|
47
|
+
**return** [Boolean] True for farmed salmon
|
48
|
+
## wild[RW] [](#attribute-i-wild)
|
49
|
+
|
50
|
+
**return** [Boolean] True for wild salmon
|
51
|
+
|
52
|
+
# Constants
|
53
|
+
## DEFAULT_SALMON_SPEED [](#constant-DEFAULT_SALMON_SPEED)
|
54
|
+
|
55
|
+
|
56
|
+
## MAX_DEPTH [](#constant-MAX_DEPTH)
|
57
|
+
|
58
|
+
|
data/example/index.csv
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
name,type,path
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
swim,Method,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
swim,Method,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
rubber,Attribute,Duck.md#attribute-i-rubber
|
2
|
+
Aquatic,Module,Aquatic.md
|
3
|
+
Aquatic.DEFAULT_SALMON_SPEED,Constant,Aquatic.md#constant-DEFAULT_SALMON_SPEED
|
4
|
+
Aquatic.MAX_DEPTH,Constant,Aquatic.md#constant-MAX_DEPTH
|
5
|
+
Aquatic.swim,Method,Aquatic.md#method-i-swim
|
6
|
+
Fish,Class,Fish.md
|
7
|
+
Fish.DEFAULT_SALMON_SPEED,Constant,Fish.md#constant-DEFAULT_SALMON_SPEED
|
8
|
+
Fish.MAX_DEPTH,Constant,Fish.md#constant-MAX_DEPTH
|
9
|
+
Fish.make_sound,Method,Fish.md#method-i-make_sound
|
10
|
+
Fish.swim,Method,Fish.md#method-i-swim
|
11
|
+
Salmon,Class,Salmon.md
|
12
|
+
Salmon.DEFAULT_SALMON_SPEED,Constant,Salmon.md#constant-DEFAULT_SALMON_SPEED
|
13
|
+
Salmon.MAX_DEPTH,Constant,Salmon.md#constant-MAX_DEPTH
|
14
|
+
Salmon.initialize,Method,Salmon.md#method-i-initialize
|
15
|
+
Salmon.make_sound,Method,Salmon.md#method-i-make_sound
|
16
|
+
Salmon.sustainable?,Method,Salmon.md#method-i-sustainable?
|
17
|
+
Salmon.swim,Method,Salmon.md#method-i-swim
|
18
|
+
Salmon.wild_salmon,Method,Salmon.md#method-c-wild_salmon
|
19
|
+
farmed,Attribute,Salmon.md#attribute-i-farmed
|
20
|
+
wild,Attribute,Salmon.md#attribute-i-wild
|
data/example_yard.rb
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
# @title YARD Markdown Example
|
2
|
+
# @description This example demonstrates various YARD features using markdown formatting.
|
3
|
+
#
|
4
|
+
# ## Links
|
5
|
+
#
|
6
|
+
# 1. [YARD Documentation](https://yardoc.org/)
|
7
|
+
# 2. [Markdown Syntax](https://daringfireball.net/projects/markdown/syntax)
|
8
|
+
|
9
|
+
# A mixin for aquatic creatures.
|
10
|
+
module Aquatic
|
11
|
+
# Swim in the water.
|
12
|
+
#
|
13
|
+
# @return [void]
|
14
|
+
def swim
|
15
|
+
puts "swimming in the water"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# The base class for all fish.
|
20
|
+
class Fish
|
21
|
+
# Make a sound.
|
22
|
+
#
|
23
|
+
# @yield [sound] The sound produced by the fish
|
24
|
+
# @yieldparam sound [String] The actual sound
|
25
|
+
# @return [void]
|
26
|
+
def make_sound
|
27
|
+
puts "generic bubbling"
|
28
|
+
yield "blub"
|
29
|
+
yield "blub"
|
30
|
+
end
|
31
|
+
|
32
|
+
# Swim in a specific direction.
|
33
|
+
#
|
34
|
+
# Swimming is the most critical feature of fish.
|
35
|
+
#
|
36
|
+
# @param direction [Symbol, String] The direction to swim
|
37
|
+
# @param speed [Integer] The speed at which to swim
|
38
|
+
# @return [Boolean] Whether the swim was successful
|
39
|
+
#
|
40
|
+
# @example
|
41
|
+
# swim(:north, 30)
|
42
|
+
def swim(direction, speed)
|
43
|
+
_swim_impl(direction, speed)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
# @!visibility private
|
49
|
+
def _swim_impl(direction, speed)
|
50
|
+
puts "swimming away: direction=#{direction}, speed=#{speed}"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# A salmon is an Aquatic Fish.
|
55
|
+
#
|
56
|
+
# ## Features
|
57
|
+
#
|
58
|
+
# - **Fish**
|
59
|
+
# - make_sound
|
60
|
+
# - swim
|
61
|
+
# - **Aquatic**
|
62
|
+
# - swim (overridden)
|
63
|
+
class Salmon < Fish
|
64
|
+
include Aquatic
|
65
|
+
|
66
|
+
# @!group Fish overrides
|
67
|
+
|
68
|
+
# Salmon overrides generic implementation.
|
69
|
+
#
|
70
|
+
# @yield [sound] The sound produced by the salmon
|
71
|
+
# @yieldparam sound [String] The actual sound
|
72
|
+
# @return [void]
|
73
|
+
def make_sound
|
74
|
+
sound = splash
|
75
|
+
yield sound
|
76
|
+
end
|
77
|
+
|
78
|
+
# Implements splashing
|
79
|
+
#
|
80
|
+
# @return [String] The splash sound
|
81
|
+
def splash
|
82
|
+
"splash"
|
83
|
+
end
|
84
|
+
|
85
|
+
private :splash
|
86
|
+
|
87
|
+
# @!endgroup
|
88
|
+
|
89
|
+
# @!group Salmon specific attributes
|
90
|
+
|
91
|
+
# @return [Boolean] True for farmed salmon
|
92
|
+
attr_accessor :farmed
|
93
|
+
|
94
|
+
# @return [Boolean] True for wild salmon
|
95
|
+
attr_reader :wild
|
96
|
+
|
97
|
+
# @return [Integer] Maximum speed for a swimming salmon
|
98
|
+
MAX_SPEED = 40
|
99
|
+
|
100
|
+
# @!endgroup
|
101
|
+
|
102
|
+
# Global list of all wild salmon.
|
103
|
+
#
|
104
|
+
# Use for conservation efforts.
|
105
|
+
@@wild_salmon = []
|
106
|
+
|
107
|
+
# @return [Array<Salmon>] List of all wild salmon
|
108
|
+
def self.wild_salmon
|
109
|
+
@@wild_salmon
|
110
|
+
end
|
111
|
+
|
112
|
+
# Creates a new salmon.
|
113
|
+
#
|
114
|
+
# @param farmed [Boolean] Whether the salmon is farmed
|
115
|
+
# @param wild [Boolean] Whether the salmon is wild
|
116
|
+
def initialize(farmed, wild)
|
117
|
+
@farmed = farmed
|
118
|
+
@wild = wild
|
119
|
+
@@wild_salmon << self if wild
|
120
|
+
end
|
121
|
+
|
122
|
+
# Checks if this salmon is sustainable.
|
123
|
+
#
|
124
|
+
# @return [Boolean] Whether the salmon is sustainable
|
125
|
+
def sustainable?
|
126
|
+
@wild || (@farmed && environmentally_friendly?)
|
127
|
+
end
|
128
|
+
|
129
|
+
private
|
130
|
+
|
131
|
+
# @return [Boolean] Whether farming practices are environmentally friendly
|
132
|
+
def environmentally_friendly?
|
133
|
+
# Implementation details...
|
134
|
+
true
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# @!constant [Integer] DEFAULT_SALMON_SPEED
|
139
|
+
# Default speed for a swimming salmon
|
140
|
+
DEFAULT_SALMON_SPEED = 20
|
141
|
+
|
142
|
+
# @!constant [Integer] MAX_DEPTH
|
143
|
+
# Maximum depth for salmon habitat
|
144
|
+
MAX_DEPTH = 500
|
145
|
+
|
146
|
+
# Default wild salmon.
|
147
|
+
#
|
148
|
+
# @note Global variables should be used sparingly, but this is for demonstration.
|
149
|
+
$default_wild_salmon = Salmon.new(false, true)
|
150
|
+
|
151
|
+
# Farmed sustainable salmon.
|
152
|
+
#
|
153
|
+
# @note This is just a local variable for demonstration purposes.
|
154
|
+
farmed_sustainable_salmon = Salmon.new(true, false)
|
@@ -50,7 +50,7 @@ def serialize_index(objects)
|
|
50
50
|
if constant_listing.size.positive?
|
51
51
|
constant_listing.each do |cnst|
|
52
52
|
csv << [
|
53
|
-
cnst.name(false),
|
53
|
+
"#{object.path}.#{cnst.name(false)}",
|
54
54
|
"Constant",
|
55
55
|
(options.serializer.serialized_path(object) + "#" + aref(cnst)),
|
56
56
|
]
|
@@ -60,7 +60,7 @@ def serialize_index(objects)
|
|
60
60
|
if (insmeths = public_instance_methods(object)).size > 0
|
61
61
|
insmeths.each do |item|
|
62
62
|
csv << [
|
63
|
-
item.name(false),
|
63
|
+
"#{object.path}.#{item.name(false)}",
|
64
64
|
"Method",
|
65
65
|
options.serializer.serialized_path(object) + "#" + aref(item),
|
66
66
|
]
|
@@ -70,7 +70,7 @@ def serialize_index(objects)
|
|
70
70
|
if (pubmeths = public_class_methods(object)).size > 0
|
71
71
|
pubmeths.each do |item|
|
72
72
|
csv << [
|
73
|
-
item.name(false),
|
73
|
+
"#{object.path}.#{item.name(false)}",
|
74
74
|
"Method",
|
75
75
|
options.serializer.serialized_path(object) + "#" + aref(item),
|
76
76
|
]
|
@@ -90,6 +90,10 @@ def serialize_index(objects)
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
# @param object [YARD::CodeObjects::Base]
|
94
|
+
# @return [String] markdown formatted string
|
95
|
+
#
|
96
|
+
# @todo Extract template out of setup.rb class.
|
93
97
|
def serialize(object)
|
94
98
|
template =
|
95
99
|
ERB.new(
|
@@ -106,12 +110,14 @@ def serialize(object)
|
|
106
110
|
|
107
111
|
<%= rdoc_to_md object.docstring %>
|
108
112
|
|
113
|
+
<%= render_tags object %>
|
109
114
|
<% if (insmeths = public_instance_methods(object)).size > 0 %>
|
110
115
|
# Public Instance Methods
|
111
116
|
<% insmeths.each do |item| %>
|
112
117
|
## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join("") }.join(", ")%>) [](#<%=aref(item)%>)
|
113
118
|
<%= rdoc_to_md item.docstring %>
|
114
119
|
|
120
|
+
<%= render_tags item %>
|
115
121
|
<% end %><% end %>
|
116
122
|
|
117
123
|
<% if (pubmeths = public_class_methods(object)).size > 0 %>
|
@@ -119,6 +125,7 @@ def serialize(object)
|
|
119
125
|
<% pubmeths.each do |item| %>
|
120
126
|
## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join(" ") }.join(", ") %>) [](#<%=aref(item)%>)
|
121
127
|
<%= rdoc_to_md item.docstring %>
|
128
|
+
<%= render_tags item %>
|
122
129
|
|
123
130
|
<% end %>
|
124
131
|
<% end %>
|
@@ -128,6 +135,7 @@ def serialize(object)
|
|
128
135
|
## <%= item.name %><%= item.reader? ? "[RW]" : "[R]" %> [](#<%=aref(item)%>)
|
129
136
|
<%= rdoc_to_md item.docstring %>
|
130
137
|
|
138
|
+
<%= render_tags item %>
|
131
139
|
<% end %>
|
132
140
|
<% end %>
|
133
141
|
|
@@ -138,6 +146,8 @@ def serialize(object)
|
|
138
146
|
## <%= cnst.name %> [](#<%=aref(cnst)%>)
|
139
147
|
<%= rdoc_to_md cnst.docstring %>
|
140
148
|
|
149
|
+
<%= render_tags cnst %>
|
150
|
+
|
141
151
|
<% end %><% end %><% end %>',
|
142
152
|
trim_mode: "<>",
|
143
153
|
)
|
@@ -147,10 +157,50 @@ end
|
|
147
157
|
|
148
158
|
require "rdoc"
|
149
159
|
|
160
|
+
##
|
161
|
+
# Converts rdoc to markdown.
|
162
|
+
#
|
163
|
+
# I didn't found a way to detect yard/rdoc docstrings, so we're running docstrings through rdoc to markdown converter in all cases. If it's yard docstring, it doesn't seem to have any negative effect on end results. But absense of bugs, doesn't mean that there are no issues.
|
164
|
+
#
|
165
|
+
# @param docstring [String, YARD::Docstring]
|
166
|
+
# @return [String] markdown formatted string
|
150
167
|
def rdoc_to_md(docstring)
|
151
168
|
RDoc::Markup::ToMarkdown.new.convert(docstring)
|
152
169
|
end
|
153
170
|
|
171
|
+
##
|
172
|
+
# Formats yard tags belonging to a object.
|
173
|
+
#
|
174
|
+
# This is mostly a feature of yard and rdoc doesn't have any of that. Rdoc supports ":nodoc:" and other tags. Yard claims to have full support for rdoc, doesn't really handle tags like ":nodoc:" or anything else from rdoc.
|
175
|
+
#
|
176
|
+
# There is an attempt to handle @example tag differently, we surround it with a code block.
|
177
|
+
#
|
178
|
+
# @see https://rubydoc.info/gems/yard/file/docs/TagsArch.md
|
179
|
+
#
|
180
|
+
# @param object [YARD::CodeObjects::Base]
|
181
|
+
# @return [String] markdown formatted string of Tags
|
182
|
+
|
183
|
+
def render_tags(object)
|
184
|
+
result = String.new("")
|
185
|
+
object.tags.each do |tag|
|
186
|
+
result << if !(tag.tag_name == "example")
|
187
|
+
"**@#{tag.tag_name}** [#{tag.types&.join(', ')}] #{tag.text}\n"
|
188
|
+
else
|
189
|
+
""
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
object.tags.each do |tag|
|
194
|
+
result << if (tag.tag_name == "example")
|
195
|
+
"\n**@#{tag.tag_name}**\n```ruby\n#{tag.text}\n```"
|
196
|
+
else
|
197
|
+
""
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
result
|
202
|
+
end
|
203
|
+
|
154
204
|
def aref(object)
|
155
205
|
if object.type == :constant
|
156
206
|
"constant-#{object.name(false)}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stanislav (Stas) Katkov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: csv
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: yard plugin to generate markdown documentation for gems
|
28
42
|
email:
|
29
43
|
- yard-markdown@skatkov.com
|
@@ -37,13 +51,12 @@ files:
|
|
37
51
|
- LICENSE.txt
|
38
52
|
- README.md
|
39
53
|
- Rakefile
|
40
|
-
- example.
|
41
|
-
- example/
|
42
|
-
- example/
|
43
|
-
- example/Waterfowl.md
|
44
|
-
- example/YARD.md
|
45
|
-
- example/YARD/Markdown.md
|
54
|
+
- example/Aquatic.md
|
55
|
+
- example/Fish.md
|
56
|
+
- example/Salmon.md
|
46
57
|
- example/index.csv
|
58
|
+
- example_rdoc.rb
|
59
|
+
- example_yard.rb
|
47
60
|
- lib/yard-markdown.rb
|
48
61
|
- sig/yard/markdown.rbs
|
49
62
|
- templates/default/fulldoc/markdown/setup.rb
|
@@ -68,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
81
|
- !ruby/object:Gem::Version
|
69
82
|
version: '0'
|
70
83
|
requirements: []
|
71
|
-
rubygems_version: 3.5.
|
84
|
+
rubygems_version: 3.5.9
|
72
85
|
signing_key:
|
73
86
|
specification_version: 4
|
74
87
|
summary: yard plugin to generate markdown documentation
|
data/example/Bird.md
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# Class: Bird
|
2
|
-
**Inherits:** Object
|
3
|
-
|
4
|
-
**Defined in:** example.rb
|
5
|
-
|
6
|
-
The base class for all birds.
|
7
|
-
|
8
|
-
# Public Instance Methods
|
9
|
-
## _fly_impl(_direction, _velocity) [](#method-i-_fly_impl)
|
10
|
-
:nodoc:
|
11
|
-
|
12
|
-
## fly(direction, velocity) [](#method-i-fly)
|
13
|
-
Fly somewhere.
|
14
|
-
|
15
|
-
Flying is the most critical feature of birds.
|
16
|
-
|
17
|
-
:args: direction, velocity
|
18
|
-
|
19
|
-
:call-seq:
|
20
|
-
Bird.fly(symbol, number) -> bool
|
21
|
-
Bird.fly(string, number) -> bool
|
22
|
-
|
23
|
-
# Example
|
24
|
-
|
25
|
-
fly(:south, 70)
|
26
|
-
|
27
|
-
## speak() [](#method-i-speak)
|
28
|
-
Produce some noise. -- FIXME: maybe extract this to a base class `Animal`? ++
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
# Constants
|
33
|
-
## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
|
34
|
-
Default velocity for a flying duck.
|
35
|
-
|
36
|
-
## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
|
37
|
-
Maximum speed for a swimming duck.
|
38
|
-
|
data/example/Duck.md
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
# Class: Duck
|
2
|
-
**Inherits:** Object
|
3
|
-
|
4
|
-
**Extended by:** Animal
|
5
|
-
|
6
|
-
**Includes:** Waterfowl
|
7
|
-
|
8
|
-
**Defined in:** example.rb
|
9
|
-
|
10
|
-
A duck is a Waterfowl Bird.
|
11
|
-
|
12
|
-
Features:
|
13
|
-
|
14
|
-
bird::
|
15
|
-
|
16
|
-
* speak
|
17
|
-
* fly
|
18
|
-
|
19
|
-
waterfowl::
|
20
|
-
|
21
|
-
* swim
|
22
|
-
|
23
|
-
# Public Instance Methods
|
24
|
-
## initialize(domestic, rubber) [](#method-i-initialize)
|
25
|
-
Creates a new duck.
|
26
|
-
|
27
|
-
## speak() [](#method-i-speak)
|
28
|
-
Duck overrides generic implementation.
|
29
|
-
|
30
|
-
## swim() [](#method-i-swim)
|
31
|
-
Swimming helper.
|
32
|
-
|
33
|
-
## useful?() [](#method-i-useful?)
|
34
|
-
Checks if this duck is a useful one.
|
35
|
-
|
36
|
-
:call-seq:
|
37
|
-
Bird.useful? -> bool
|
38
|
-
|
39
|
-
|
40
|
-
# Public Class Methods
|
41
|
-
## rubber_ducks() [](#method-c-rubber_ducks)
|
42
|
-
|
43
|
-
# Attributes
|
44
|
-
## domestic[RW] [](#attribute-i-domestic)
|
45
|
-
True for domestic ducks.
|
46
|
-
|
47
|
-
## rubber[RW] [](#attribute-i-rubber)
|
48
|
-
True for rubber ducks.
|
49
|
-
|
50
|
-
|
51
|
-
# Constants
|
52
|
-
## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
|
53
|
-
Default velocity for a flying duck.
|
54
|
-
|
55
|
-
## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
|
56
|
-
Maximum speed for a swimming duck.
|
57
|
-
|
data/example/Waterfowl.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# Module: Waterfowl
|
2
|
-
|
3
|
-
**Defined in:** example.rb
|
4
|
-
|
5
|
-
A mixin for waterfowl creatures.
|
6
|
-
|
7
|
-
# Public Instance Methods
|
8
|
-
## swim() [](#method-i-swim)
|
9
|
-
Swimming helper.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
# Constants
|
14
|
-
## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
|
15
|
-
Default velocity for a flying duck.
|
16
|
-
|
17
|
-
## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
|
18
|
-
Maximum speed for a swimming duck.
|
19
|
-
|
data/example/YARD/Markdown.md
DELETED
data/example/YARD.md
DELETED
File without changes
|