yard-markdown 0.3.0 → 0.3.2

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: f629ca40401c7ee044ca4f7c513ec1e008f84f0a9bb7052ad70f15480d573f3c
4
- data.tar.gz: 4b599efff7a4c66581aae75cbb0516950c5d444a07d8f6f9ed588f2f5491498d
3
+ metadata.gz: c6a31bd0b9314cb81e288f61c6f923ad3b8b5708ae1776ca0728fc9e0e8b3a07
4
+ data.tar.gz: 83f19bcda05228295f943c1cb09cde16dc6738c60e96a7194eade9f15597c17e
5
5
  SHA512:
6
- metadata.gz: 8ef3690daab52e53c0d0c5b12487c5063bcf2b6c168b04814e2ac89fa9848aa85e42a623a83a06abcd94f4051227465362462ccd47bc70b82462f9d9dd6cf139
7
- data.tar.gz: 9e100dc76d5991c9dd767c4a7a4d04836fb832f29d81269328bfc76cbb9bcc6ae43f16e1b2102e98bcf46a0806c473584b8f052ea92820500c25243976b41e08
6
+ metadata.gz: 3e4d2ecd151a91ba5085d86f398f592c71d2d0744f46487bb07969190f8070acdeb15841325dff7a8c1b96e651fbf375a4cb3c358b5032b1734cbcc8b988c7e8
7
+ data.tar.gz: 1713b22f373b5fc163202d2e51b9c6ff3fe4f502facba94eaa37e77874ae2222f6e3e9dd5f16e6630210870528fc68cfbd86956d2bb8da6bd8b16cb4efef3724
data/example/Bird.md CHANGED
@@ -1,19 +1,14 @@
1
1
  # Class: Bird
2
- | | |
3
- | -----------------: | :----- |
4
- | **Inherits:** | Object |
5
- | **Defined in:** | example.rb |
2
+ **Inherits:** Object
3
+
4
+ **Defined in:** example.rb
6
5
 
7
6
  The base class for all birds.
8
- # Constants
9
- ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
10
- Default velocity for a flying duck.
11
- ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
12
- Maximum speed for a swimming duck.
13
7
 
14
8
  # Public Instance Methods
15
9
  ## _fly_impl(_direction, _velocity) [](#method-i-_fly_impl)
16
10
  :nodoc:
11
+
17
12
  ## fly(direction, velocity) [](#method-i-fly)
18
13
  Fly somewhere.
19
14
 
@@ -22,15 +17,22 @@ Flying is the most critical feature of birds.
22
17
  :args: direction, velocity
23
18
 
24
19
  :call-seq:
25
- Bird.fly(symbol, number) -> bool
26
- Bird.fly(string, number) -> bool
20
+ Bird.fly(symbol, number) -> bool
21
+ Bird.fly(string, number) -> bool
27
22
 
28
- = Example
23
+ # Example
24
+
25
+ fly(:south, 70)
29
26
 
30
- fly(:south, 70)
31
27
  ## speak() [](#method-i-speak)
32
- Produce some noise.
33
- --
34
- FIXME: maybe extract this to a base class +Animal+?
35
- ++
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.
36
38
 
data/example/Duck.md CHANGED
@@ -1,41 +1,41 @@
1
1
  # Class: Duck
2
- | | |
3
- | -----------------: | :----- |
4
- | **Inherits:** | Object |
5
- | **Extended by:** | Animal |
6
- | **Includes:** | Waterfowl |
7
- | **Defined in:** | example.rb |
2
+ **Inherits:** Object
3
+
4
+ **Extended by:** Animal
5
+
6
+ **Includes:** Waterfowl
7
+
8
+ **Defined in:** example.rb
8
9
 
9
10
  A duck is a Waterfowl Bird.
10
11
 
11
12
  Features:
12
13
 
13
- bird::
14
+ bird::
14
15
 
15
- * speak
16
- * fly
16
+ * speak
17
+ * fly
17
18
 
18
- waterfowl::
19
+ waterfowl::
19
20
 
20
- * swim
21
- # Constants
22
- ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
23
- Default velocity for a flying duck.
24
- ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
25
- Maximum speed for a swimming duck.
21
+ * swim
26
22
 
27
23
  # Public Instance Methods
28
24
  ## initialize(domestic, rubber) [](#method-i-initialize)
29
25
  Creates a new duck.
26
+
30
27
  ## speak() [](#method-i-speak)
31
28
  Duck overrides generic implementation.
29
+
32
30
  ## swim() [](#method-i-swim)
33
31
  Swimming helper.
32
+
34
33
  ## useful?() [](#method-i-useful?)
35
34
  Checks if this duck is a useful one.
36
35
 
37
36
  :call-seq:
38
- Bird.useful? -> bool
37
+ Bird.useful? -> bool
38
+
39
39
 
40
40
  # Public Class Methods
41
41
  ## rubber_ducks() [](#method-c-rubber_ducks)
@@ -43,5 +43,15 @@ Checks if this duck is a useful one.
43
43
  # Attributes
44
44
  ## domestic[RW] [](#attribute-i-domestic)
45
45
  True for domestic ducks.
46
+
46
47
  ## rubber[RW] [](#attribute-i-rubber)
47
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 CHANGED
@@ -1,16 +1,19 @@
1
1
  # Module: Waterfowl
2
- | | |
3
- | -----------------: | :----- |
4
- | **Defined in:** | example.rb |
2
+
3
+ **Defined in:** example.rb
5
4
 
6
5
  A mixin for waterfowl creatures.
6
+
7
+ # Public Instance Methods
8
+ ## swim() [](#method-i-swim)
9
+ Swimming helper.
10
+
11
+
12
+
7
13
  # Constants
8
14
  ## DEFAULT_DUCK_VELOCITY [](#constant-DEFAULT_DUCK_VELOCITY)
9
15
  Default velocity for a flying duck.
16
+
10
17
  ## DEFAULT_SPEED [](#constant-DEFAULT_SPEED)
11
18
  Maximum speed for a swimming duck.
12
19
 
13
- # Public Instance Methods
14
- ## swim() [](#method-i-swim)
15
- Swimming helper.
16
-
@@ -94,61 +94,51 @@ def serialize(object)
94
94
  template =
95
95
  ERB.new(
96
96
  '# <%= format_object_title object %>
97
- | | |
98
- | -----------------: | :----- |
99
97
  <% if CodeObjects::ClassObject === object && object.superclass %>
100
- | **Inherits:** | <%= object.superclass %> |
101
- <% end %>
102
- <% [[:class, "Extended by"], [:instance, "Includes"]].each do |scope, name| %>
98
+ **Inherits:** <%= object.superclass %>
99
+ <% end %><% [[:class, "Extended by"], [:instance, "Includes"]].each do |scope, name| %>
103
100
  <% if (mix = run_verifier(object.mixins(scope))).size > 0 %>
104
- | **<%= name %>:** | <%= mix.sort_by {|o| o.path }.join(", ") %> |
105
- <% end %>
106
- <% end %>
101
+ **<%= name %>:** <%= mix.sort_by {|o| o.path }.join(", ") %>
102
+ <% end %><% end %>
107
103
  <% unless object.root? %>
108
- | **Defined in:** | <%= object.file ? object.file : "(unknown)" %> |
104
+ **Defined in:** <%= object.file ? object.file : "(unknown)" %>
109
105
  <% end %>
110
106
 
111
107
  <%= rdoc_to_md object.docstring %>
112
108
 
113
-
114
109
  <% if (insmeths = public_instance_methods(object)).size > 0 %>
115
- # Public Instance Methods
116
- <% insmeths.each do |item| %>
117
- ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join("") }.join(", ")%>) [](#<%=aref(item)%>)
118
- <%= 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 %>
119
114
 
120
- <% end %>
121
- <% end %>
115
+ <% end %><% end %>
122
116
 
123
117
  <% if (pubmeths = public_class_methods(object)).size > 0 %>
124
- # Public Class Methods
125
- <% pubmeths.each do |item| %>
126
- ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join(" ") }.join(", ") %>) [](#<%=aref(item)%>)
127
- <%= 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 %>
128
122
 
129
- <% end %>
123
+ <% end %>
130
124
  <% end %>
131
125
  <% if (attrs = attr_listing(object)).size > 0 %>
132
- # Attributes
133
- <% attrs.each do |item|%>
134
- ## <%= item.name %><%= item.reader? ? "[RW]" : "[R]" %> [](#<%=aref(item)%>)
135
- <%= 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 %>
136
130
 
137
- <% end %>
138
131
  <% end %>
139
-
132
+ <% end %>
140
133
 
141
134
  <% if constant_listing.size > 0 %>
142
135
  <% groups(constant_listing, "Constants") do |list, name| %>
143
- # <%= name %>
144
- <% list.each do |cnst| %>
145
- ## <%= cnst.name %> [](#<%=aref(cnst)%>)
146
- <%= rdoc_to_md cnst.docstring %>
136
+ # <%= name %>
137
+ <% list.each do |cnst| %>
138
+ ## <%= cnst.name %> [](#<%=aref(cnst)%>)
139
+ <%= rdoc_to_md cnst.docstring %>
147
140
 
148
- <% end %>
149
- <% end %>
150
- <% end %>
151
- ', trim_mode: "%<>")
141
+ <% end %><% end %><% end %>', trim_mode: "<>")
152
142
 
153
143
  template.result(binding)
154
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.0
4
+ version: 0.3.2
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-15 00:00:00.000000000 Z
11
+ date: 2024-01-29 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.4
69
+ rubygems_version: 3.5.5
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: yard plugin to generate markdown documentation