yard-markdown 0.3.1 → 0.3.3

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
  SHA256:
3
- metadata.gz: '0282033a919774b5cd92979a1291cda4ed834c27cbfc21ca231982475aefa6cf'
4
- data.tar.gz: ade62aa4bc7c6091cbdc229bebf16ec77f753bba17e0ab0e0ef0fe28527838a9
3
+ metadata.gz: 994fce8f139b82058ade4ab60aeca1be434534bd49f0977bcdf95a651f47a58a
4
+ data.tar.gz: 144b2c3130b9a44d9329c752a61afedc6ca41a28b02a168c8ab6c896179e4857
5
5
  SHA512:
6
- metadata.gz: 8604ca85cdc4e6486b00e94a694fa35661dc06c9042882e41afe9e41fa863d582173473b8fbc8e1edb8e08db8908ab26bc887c4773465c8d94c04c6c72992366
7
- data.tar.gz: bbf3e68cd55b9ead82fbe0307d106e7e31a284fbb567eadb3bf6ab08c4b2ba1523699629950e7d85124216da3c94f114220e3bf2c0857d5f0d2d088ca39d0074
6
+ metadata.gz: 26ac0898777ff288b0af6860fb0aa92d824720e92ed53e008ce51584ac954751917f3f3e05d2ad46e79d2f4015abaad61ab79c488b63cbad388b8e6a91cce40d
7
+ data.tar.gz: 9a00633d63955616a565666aedac85b7c0d94841cc9c85bd0e810e79f7cbfd830c70163435c45d77f97aa77c27a4124460fc06f0a9cb20946055ed6af9994f36
data/example/Bird.md CHANGED
@@ -5,16 +5,12 @@
5
5
 
6
6
  The base class for all birds.
7
7
 
8
+ # Public Instance Methods
9
+ ## _fly_impl(_direction, _velocity) [](#method-i-_fly_impl)
10
+ :nodoc:
8
11
 
9
- # Public Instance Methods
10
-
11
- ## _fly_impl(_direction, _velocity) [](#method-i-_fly_impl)
12
- :nodoc:
13
-
14
-
15
-
16
- ## fly(direction, velocity) [](#method-i-fly)
17
- Fly somewhere.
12
+ ## fly(direction, velocity) [](#method-i-fly)
13
+ Fly somewhere.
18
14
 
19
15
  Flying is the most critical feature of birds.
20
16
 
@@ -28,26 +24,15 @@ Flying is the most critical feature of birds.
28
24
 
29
25
  fly(:south, 70)
30
26
 
27
+ ## speak() [](#method-i-speak)
28
+ Produce some noise. -- FIXME: maybe extract this to a base class `Animal`? ++
31
29
 
32
-
33
- ## speak() [](#method-i-speak)
34
- Produce some noise. -- FIXME: maybe extract this to a base class `Animal`? ++
35
-
36
-
37
-
38
-
39
-
40
-
41
- # Constants
42
-
43
- ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
44
- Default velocity for a flying duck.
45
30
 
46
31
 
47
-
48
- ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
49
- Maximum speed for a swimming duck.
32
+ # Constants
33
+ ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
34
+ Default velocity for a flying duck.
50
35
 
36
+ ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
37
+ Maximum speed for a swimming duck.
51
38
 
52
-
53
-
data/example/Duck.md CHANGED
@@ -20,63 +20,38 @@ Features:
20
20
 
21
21
  * swim
22
22
 
23
+ # Public Instance Methods
24
+ ## initialize(domestic, rubber) [](#method-i-initialize)
25
+ Creates a new duck.
23
26
 
24
- # Public Instance Methods
25
-
26
- ## initialize(domestic, rubber) [](#method-i-initialize)
27
- Creates a new duck.
28
-
29
-
30
-
31
- ## speak() [](#method-i-speak)
32
- Duck overrides generic implementation.
33
-
34
-
35
-
36
- ## swim() [](#method-i-swim)
37
- Swimming helper.
27
+ ## speak() [](#method-i-speak)
28
+ Duck overrides generic implementation.
38
29
 
30
+ ## swim() [](#method-i-swim)
31
+ Swimming helper.
39
32
 
40
-
41
- ## useful?() [](#method-i-useful?)
42
- Checks if this duck is a useful one.
33
+ ## useful?() [](#method-i-useful?)
34
+ Checks if this duck is a useful one.
43
35
 
44
36
  :call-seq:
45
37
  Bird.useful? -> bool
46
38
 
47
39
 
48
-
49
-
50
- # Public Class Methods
51
-
52
- ## rubber_ducks() [](#method-c-rubber_ducks)
53
-
54
-
55
-
56
- # Attributes
57
-
58
- ## domestic[RW] [](#attribute-i-domestic)
59
- True for domestic ducks.
60
-
61
-
62
-
63
- ## rubber[RW] [](#attribute-i-rubber)
64
- True for rubber ducks.
65
-
66
-
67
-
40
+ # Public Class Methods
41
+ ## rubber_ducks() [](#method-c-rubber_ducks)
68
42
 
43
+ # Attributes
44
+ ## domestic[RW] [](#attribute-i-domestic)
45
+ True for domestic ducks.
69
46
 
70
- # Constants
71
-
72
- ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
73
- Default velocity for a flying duck.
47
+ ## rubber[RW] [](#attribute-i-rubber)
48
+ True for rubber ducks.
74
49
 
75
50
 
76
-
77
- ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
78
- Maximum speed for a swimming duck.
51
+ # Constants
52
+ ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
53
+ Default velocity for a flying duck.
79
54
 
55
+ ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
56
+ Maximum speed for a swimming duck.
80
57
 
81
-
82
-
data/example/Waterfowl.md CHANGED
@@ -4,27 +4,16 @@
4
4
 
5
5
  A mixin for waterfowl creatures.
6
6
 
7
+ # Public Instance Methods
8
+ ## swim() [](#method-i-swim)
9
+ Swimming helper.
7
10
 
8
- # Public Instance Methods
9
-
10
- ## swim() [](#method-i-swim)
11
- Swimming helper.
12
11
 
13
12
 
14
-
13
+ # Constants
14
+ ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
15
+ Default velocity for a flying duck.
15
16
 
17
+ ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
18
+ Maximum speed for a swimming duck.
16
19
 
17
-
18
- # Constants
19
-
20
- ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
21
- Default velocity for a flying duck.
22
-
23
-
24
-
25
- ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
26
- Maximum speed for a swimming duck.
27
-
28
-
29
-
30
-
@@ -42,9 +42,9 @@ def serialize_index(objects)
42
42
  next if object.name == :root
43
43
 
44
44
  if object.type == :class
45
- csv << [object.name, "Class", options.serializer.serialized_path(object)]
45
+ csv << [object.path, "Class", options.serializer.serialized_path(object)]
46
46
  elsif object.type == :module
47
- csv << [object.name, "Module", options.serializer.serialized_path(object)]
47
+ csv << [object.path, "Module", options.serializer.serialized_path(object)]
48
48
  end
49
49
 
50
50
  if constant_listing.size.positive?
@@ -106,45 +106,39 @@ def serialize(object)
106
106
 
107
107
  <%= rdoc_to_md object.docstring %>
108
108
 
109
-
110
109
  <% if (insmeths = public_instance_methods(object)).size > 0 %>
111
- # Public Instance Methods
112
- <% insmeths.each do |item| %>
113
- ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join("") }.join(", ")%>) [](#<%=aref(item)%>)
114
- <%= rdoc_to_md item.docstring %>
110
+ # Public Instance Methods
111
+ <% insmeths.each do |item| %>
112
+ ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join("") }.join(", ")%>) [](#<%=aref(item)%>)
113
+ <%= rdoc_to_md item.docstring %>
115
114
 
116
- <% end %>
117
- <% end %>
115
+ <% end %><% end %>
118
116
 
119
117
  <% if (pubmeths = public_class_methods(object)).size > 0 %>
120
- # Public Class Methods
121
- <% pubmeths.each do |item| %>
122
- ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join(" ") }.join(", ") %>) [](#<%=aref(item)%>)
123
- <%= rdoc_to_md item.docstring %>
118
+ # Public Class Methods
119
+ <% pubmeths.each do |item| %>
120
+ ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join(" ") }.join(", ") %>) [](#<%=aref(item)%>)
121
+ <%= rdoc_to_md item.docstring %>
124
122
 
125
- <% end %>
123
+ <% end %>
126
124
  <% end %>
127
125
  <% if (attrs = attr_listing(object)).size > 0 %>
128
- # Attributes
129
- <% attrs.each do |item|%>
130
- ## <%= item.name %><%= item.reader? ? "[RW]" : "[R]" %> [](#<%=aref(item)%>)
131
- <%= rdoc_to_md item.docstring %>
126
+ # Attributes
127
+ <% attrs.each do |item|%>
128
+ ## <%= item.name %><%= item.reader? ? "[RW]" : "[R]" %> [](#<%=aref(item)%>)
129
+ <%= rdoc_to_md item.docstring %>
132
130
 
133
- <% end %>
134
131
  <% end %>
135
-
132
+ <% end %>
136
133
 
137
134
  <% if constant_listing.size > 0 %>
138
135
  <% groups(constant_listing, "Constants") do |list, name| %>
139
- # <%= name %>
140
- <% list.each do |cnst| %>
141
- ## <%= cnst.name %> [](#<%=aref(cnst)%>)
142
- <%= rdoc_to_md cnst.docstring %>
136
+ # <%= name %>
137
+ <% list.each do |cnst| %>
138
+ ## <%= cnst.name %> [](#<%=aref(cnst)%>)
139
+ <%= rdoc_to_md cnst.docstring %>
143
140
 
144
- <% end %>
145
- <% end %>
146
- <% end %>
147
- ', trim_mode: "%<>")
141
+ <% end %><% end %><% end %>', trim_mode: "<>")
148
142
 
149
143
  template.result(binding)
150
144
  end
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.3.1
4
+ version: 0.3.3
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-01-29 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.5.5
69
+ rubygems_version: 3.5.3
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: yard plugin to generate markdown documentation