readme_yard 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e70847a5ff6d1679d77cc14a1f61154d1c43bd4f54087cca2cef1ecfa3288130
4
- data.tar.gz: a78c652849586570a7fc15d8f327db4b57458bb230ec46c325ed6d207d7fcd9a
3
+ metadata.gz: 755f223afede15fbac8b87531730204494747aaf8b95302bf0cae4ca9a8822d3
4
+ data.tar.gz: b765382a63cf98480cf2e557f793272c046f18916313b8907875f0fa70e4ee30
5
5
  SHA512:
6
- metadata.gz: 2d185d882b7be9a813841ec178a9ad1cf91c0b7ca48801ccf892500096cb5fb9295c5859bb17ad8356bf8c12d9a52741ef73e7ffe768f58377c5a92f18b567d0
7
- data.tar.gz: 71205b0dce3be4c060af8b941a7f03fd47d7c40871c3941fbdefc572e214b2d8409eb4830a0dc5101538754e39c0ce14a433e10f18935360e4d12fb1f9fa54b7
6
+ metadata.gz: fcc797e2dd79799f06c8acfd1737b901f010b8b52300e77fa78cf0be48b249f43e3968a23a74cb5b8243072d17008e87a77ac77e91715c81724b7fc50bab5d82
7
+ data.tar.gz: 12bdfd98250616c6379d1563a92de7cc9ae3b436746f96057bf6f66feea3ba1dafc045a631579960ac0cc0fb829ea51dbf9df8aec5e94257cc270c07cc3fe72a
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5
2
+ TargetRubyVersion: 3.0
3
3
 
4
4
  Style/StringLiterals:
5
5
  Enabled: true
data/.yardopts CHANGED
@@ -1,3 +1,4 @@
1
1
  --plugin readme
2
2
  --markup markdown
3
+ --readme README.md
3
4
  lib/**/*.rb
data/CHANGELOG.md CHANGED
@@ -1,4 +1,15 @@
1
- ## [Unreleased]
1
+ ## 0.3.0 - 2025-05-04
2
+
3
+ - Update dependencies: upgraded yard-readme to 0.5.0, Ruby requirement to >= 3.0
4
+ - Add TagRegistry class to centralize tag management
5
+ - Update bundler and various gem dependencies
6
+ - Improve command-line argument handling in the readme executable
7
+ - Extract YardOptsManager to improve code organization
8
+ - Rename ObjectTag to SourceTag and rename old SourceTag to CodeTag
9
+ - Add new ValueTag and StringTag
10
+ - Add standalone tag support: enable embedding yard content in README without yard tags in the source code
11
+ - Rename format methods for consistency
12
+ - Rename `readme doc` command to `readme yard` for clarity and improved memorability
2
13
 
3
14
  ## 0.2.0 - 2021-08-08
4
15
 
data/Gemfile CHANGED
@@ -4,3 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in readme_yard.gemspec
6
6
  gemspec
7
+
8
+ gem "debug"
9
+ gem "rubocop", "~> 1.75", ">= 1.75.4"
data/Gemfile.lock CHANGED
@@ -1,44 +1,94 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- readme_yard (0.2.0)
4
+ readme_yard (0.3.0)
5
5
  tty-markdown (~> 0.7)
6
- yard-readme (~> 0.3)
6
+ yard (~> 0.9)
7
+ yard-readme (~> 0.5)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- kramdown (2.3.1)
12
- rexml
12
+ ast (2.4.3)
13
+ date (3.4.1)
14
+ debug (1.10.0)
15
+ irb (~> 1.10)
16
+ reline (>= 0.3.8)
17
+ io-console (0.8.0)
18
+ irb (1.15.2)
19
+ pp (>= 0.6.0)
20
+ rdoc (>= 4.0.0)
21
+ reline (>= 0.4.2)
22
+ json (2.11.3)
23
+ kramdown (2.5.1)
24
+ rexml (>= 3.3.9)
25
+ language_server-protocol (3.17.0.4)
26
+ lint_roller (1.1.0)
27
+ parallel (1.27.0)
28
+ parser (3.3.8.0)
29
+ ast (~> 2.4.1)
30
+ racc
13
31
  pastel (0.8.0)
14
32
  tty-color (~> 0.5)
15
- rexml (3.2.5)
16
- rouge (3.26.0)
33
+ pp (0.6.2)
34
+ prettyprint
35
+ prettyprint (0.2.0)
36
+ prism (1.4.0)
37
+ psych (5.2.4)
38
+ date
39
+ stringio
40
+ racc (1.8.1)
41
+ rainbow (3.1.1)
42
+ rdoc (6.13.1)
43
+ psych (>= 4.0.0)
44
+ regexp_parser (2.10.0)
45
+ reline (0.6.1)
46
+ io-console (~> 0.5)
47
+ rexml (3.4.1)
48
+ rouge (4.5.2)
49
+ rubocop (1.75.4)
50
+ json (~> 2.3)
51
+ language_server-protocol (~> 3.17.0.2)
52
+ lint_roller (~> 1.1.0)
53
+ parallel (~> 1.10)
54
+ parser (>= 3.3.0.2)
55
+ rainbow (>= 2.2.2, < 4.0)
56
+ regexp_parser (>= 2.9.3, < 3.0)
57
+ rubocop-ast (>= 1.44.0, < 2.0)
58
+ ruby-progressbar (~> 1.7)
59
+ unicode-display_width (>= 2.4.0, < 4.0)
60
+ rubocop-ast (1.44.1)
61
+ parser (>= 3.3.7.2)
62
+ prism (~> 1.4)
63
+ ruby-progressbar (1.13.0)
64
+ stringio (3.1.7)
17
65
  strings (0.2.1)
18
66
  strings-ansi (~> 0.2)
19
67
  unicode-display_width (>= 1.5, < 3.0)
20
68
  unicode_utils (~> 1.4)
21
69
  strings-ansi (0.2.0)
22
70
  tty-color (0.6.0)
23
- tty-markdown (0.7.0)
71
+ tty-markdown (0.7.2)
24
72
  kramdown (>= 1.16.2, < 3.0)
25
73
  pastel (~> 0.8)
26
- rouge (~> 3.14)
74
+ rouge (>= 3.14, < 5.0)
27
75
  strings (~> 0.2.0)
28
76
  tty-color (~> 0.5)
29
77
  tty-screen (~> 0.8)
30
- tty-screen (0.8.1)
31
- unicode-display_width (2.0.0)
78
+ tty-screen (0.8.2)
79
+ unicode-display_width (2.6.0)
32
80
  unicode_utils (1.4.0)
33
- yard (0.9.26)
34
- yard-readme (0.3.0)
35
- yard (~> 0.9.26)
81
+ yard (0.9.37)
82
+ yard-readme (0.5.0)
36
83
 
37
84
  PLATFORMS
38
- arm64-darwin-20
85
+ arm64-darwin-24
39
86
 
40
87
  DEPENDENCIES
88
+ debug
89
+ irb
41
90
  readme_yard!
91
+ rubocop (~> 1.75, >= 1.75.4)
42
92
 
43
93
  BUNDLED WITH
44
- 2.2.24
94
+ 2.6.8
data/README.md CHANGED
@@ -1,23 +1,35 @@
1
1
  # Readme Yard 🌿
2
2
  [![Gem Version](https://badge.fury.io/rb/readme_yard.svg)](https://badge.fury.io/rb/readme_yard)
3
- [![Maintainability](https://api.codeclimate.com/v1/badges/9fe0012930c3886dbe00/maintainability)](https://codeclimate.com/github/mattruzicka/readme_yard/maintainability)
4
3
 
5
- Build a better README with [YARD](https://yardoc.org),
6
- one that summarizes and contextualizes the code and documentation,
7
- without duplicating them.
4
+ Build a better README with [YARD](https://yardoc.org)
5
+ by generating it straight from the source.
8
6
 
9
- This gem aims to minimize the effort needed to keep
10
- your code, docs, and README useful, syncd, and correct.
7
+ This gem aims to minimize the effort needed to keep your
8
+ README, documentation, and source code synced, useful,
9
+ and correct. Among its features, it introduces the @readme tag
10
+ that enables you to embed code comments directly into README sections,
11
+ eliminating redundancy and keeping documentation consistent
12
+ across your codebase and project README.
11
13
 
12
- For a glimpse of how it works, check out the [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md)
13
- template from which this gem's README was generated.
14
+ Look at the [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md)
15
+ template for this project to see how it works.
14
16
  If you're reading the README, that means this text is here
15
- because `{@readme ReadmeYard}` is in the README_YARD file
16
- and someone ran `readme build` at the command line.
17
+ because the custom `{@readme ReadmeYard}` markdown tag is in
18
+ README_YARD.md and `readme build` was run at the command line.
17
19
 
18
20
  Here's the [full documentation](https://rubydoc.info/github/mattruzicka/readme_yard).
19
21
 
20
22
 
23
+ ---
24
+
25
+ ⚠️ **Generated file warning** – Edit README_YARD.md, not README.md. Changes to README.md will be lost when running `readme build`.
26
+
27
+ ### Future Work
28
+ - Implement safeguards to prevent accidental edits to README.md
29
+ - Support bidirectional editing through git integration
30
+
31
+ [PRs are welcome](#contributing) for these improvements.
32
+
21
33
  ---
22
34
 
23
35
  ## Table of Contents
@@ -26,7 +38,7 @@ Here's the [full documentation](https://rubydoc.info/github/mattruzicka/readme_y
26
38
  - [Command Line Usage](#command-line-usage)
27
39
  - [Tag Usage](#tag-usage)
28
40
  - [Readme Tag](#readme-tag)
29
- - [Readme YARD Tags](#readme-yard-tags)
41
+ - [Standalone Tag Usage](#standalone-tag-usage)
30
42
  - [Example Tag](#example-tag)
31
43
  - [Contributing](#contributing)
32
44
 
@@ -34,13 +46,17 @@ Here's the [full documentation](https://rubydoc.info/github/mattruzicka/readme_y
34
46
 
35
47
  ## Installation
36
48
 
37
- Add [gem "readme_yard"](https://rubygems.org/gems/readme_yard) to your application's Gemfile and run `bundle install` or install it yourself with: `gem install readme_yard`
49
+ Add [gem "readme_yard"](https://rubygems.org/gems/readme_yard) to your Gemfile and run `bundle install` or install it yourself with: `gem install readme_yard`
50
+
51
+ **Note:** As of version 0.3.0, Readme Yard requires Ruby 3.0 or higher.
38
52
 
39
53
  ## Getting Started
40
54
 
41
- Run `readme build` at the command line. That will create a README_YARD.md file if there isnt one by copying your exisiting README.md file.
55
+ Run `readme build` at the command line. This creates a README_YARD.md file if there isn't one by copying your existing README.md file.
42
56
 
43
- README_YARD.md is the template from which `readme build` generates the README. It augments your markdown with tagging capabilities as described in the section on [Tag Usage](#tag-usage).
57
+ README_YARD.md is the template from which `readme build` generates the README. Readme Yard adds the ability to embed and reference your source code in your README via README_YARD.md.
58
+
59
+ See [Tag Usage](#tag-usage).
44
60
 
45
61
  ---
46
62
 
@@ -50,102 +66,122 @@ README_YARD.md is the template from which `readme build` generates the README. I
50
66
 
51
67
  `readme build` - Reads from README_YARD.md and writes to README.md.
52
68
 
53
- `readme doc` - Same as `readme build` + generates yard docs.
69
+ `readme yard` - Same as `readme build` + generates yard docs.
54
70
 
55
71
 
56
72
  ---
57
73
 
58
74
  ## Tag Usage
59
75
 
60
- Readme Yard uses **README tags** and **YARD tags** in order to find, format, and embed Ruby source code inside README.md.
76
+ Readme Yard uses YARD tags and custom markdown tags. YARD tags live inside Ruby source code. The markdown tags live inside README_YARD.md.
61
77
 
62
- **README tags** live inside README_YARD.md.
78
+ When the Readme Yard build process encounters a tag in README_YARD.md, it searches the Ruby source code for its YARD tag counterpart, formats the output, and embeds it in the README file.
63
79
 
64
- **YARD tags** live inside Ruby source code.
80
+ ### Tag Reference Table
65
81
 
66
- When the Readme Yard build process encounters a tag in README_YARD.md, it searches the Ruby source code for its YARD tag counterpart, formats the output, and embeds it in the README file.
82
+ | Tag Type | YARD Syntax (in source code) | Markdown Syntax (in README_YARD.md) | Standalone Tag* | Purpose |
83
+ |----------|------------------------------|-------------------------------------|----------------|---------|
84
+ | Readme | `@readme` | `{@readme ObjectPath}` | N/A | General purpose tag to embed content from source code |
85
+ | Readme (comment) | `@readme comment` | `{@readme ObjectPath}` | `{@comment ObjectPath}` | Embeds only the comment from source code |
86
+ | Readme (code) | `@readme code` | `{@readme ObjectPath}` | `{@code ObjectPath}` | Embeds only code implementation |
87
+ | Readme (source) | `@readme source` | `{@readme ObjectPath}` | `{@source ObjectPath}` | Embeds both comments and code |
88
+ | Readme (value) | `@readme value` | `{@readme ObjectPath}` | `{@value ObjectPath}` | Embeds a Ruby value as a Ruby code block |
89
+ | Readme (string) | `@readme string` | `{@readme ObjectPath}` | `{@string ObjectPath}` | Embeds a Ruby string as normal text |
90
+ | Example | `@example` | `{@example ObjectPath}` | N/A | Embeds example code from YARD @example tags |
91
+
92
+ > *Standalone tags allow embedding content without requiring corresponding YARD tags in source code. See [Standalone Tag Usage](#standalone-tag-usage) for details.
67
93
 
68
94
  ### Examples
69
95
 
70
- This project's [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md) has `{@readme ReadmeYard.hello_world}` just below this paragraph, unless you're looking at the [README]((https://github.com/mattruzicka/readme_yard/blob/main/README.md)) where you should instead see a code example which was generated from running `readme build`.
96
+ The next line is a code snippet if you're looking at [README.md](https://github.com/mattruzicka/README/blob/main/README_YARD.md) and `{@readme ReadmeYard::ExampleTag.hello_world}` if you're looking at [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md).
71
97
 
72
98
  ```ruby
73
99
  #
74
100
  # @example
75
- # ReadmeYard.hello_world #=> "Hello 🌎 🌍 🌏"
101
+ # ReadmeYard::ExampleTag.hello_world #=> "Hello 🌎 🌍 🌏"
76
102
  #
103
+ def hello_world
104
+ "Hello 🌎 🌍 🌏"
105
+ end
77
106
  ```
78
107
 
79
108
 
80
- The README tag tells Readme Yard to parse the `@readme` YARD tag located above the `hello_world` class method located in [lib/readme_yard.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
109
+ The markdown tag tells Readme Yard to parse the `@readme` tag located above the `hello_world` class method located in [lib/readme_yard/example_tag.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/example_tag.rb).
81
110
 
82
111
  To use another "meta" example, `{@readme ReadmeYard}` is used at the top of this project's README_YARD.md file to generate the first few sentences of this README. `ReadmeYard` references the class located in [lib/readme_yard.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
83
112
 
84
- Last one, `{@readme ReadmeYard#command_line_usage}` is used to generate the "Command Line Usage" section above from the comments located above. `ReadmeYard#command_line_usage` references the instance method `command_line_usage` located in [lib/readme_yard.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
113
+ Last one, `{@readme ReadmeYard#command_line_usage}` is used to generate the "Command Line Usage" section above from the comments of the `command_line_usage` instance method located in [lib/readme_yard.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb). This method is extra meta: it returns the result of formatting its own comments as markdown. In this way, the usage instructions in the comments, the README, and as printed at the command line will always be in sync.
85
114
 
86
115
  ---
87
116
 
88
117
  ## Readme Tag
89
118
 
90
- **README Tag** syntax: `{@readme ObjectPath}`
91
-
92
- **YARD Tag** syntax: `@example <name>`
119
+ **Markdown** syntax: `{@readme ObjectPath}`
93
120
 
94
- By default, only the text nested under the @readme tag
95
- will be embedded in the final output.
121
+ **YARD** syntax: `@example <name>`
96
122
 
97
- Different embed options are provided via the following
98
- name options: `comment`, `source`, and `object`.
123
+ By default, only the text nested under a @readme tag
124
+ will be embedded in the final output. The default
125
+ embed behavior can be changed through the use of tag names.
99
126
 
100
127
 
101
- The above two sentences were generated via `{@readme ReadmeYard::ReadmeTag}` in README_YARD.md and the @readme tag at the top of [ReadmeYard::ReadmeTag class](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/readme_tag.rb).
128
+ ### Embed comments
102
129
 
103
- ## Readme YARD Tags
104
130
 
131
+ **Usage:**
105
132
 
106
- ### Comment Tag
107
-
108
- ```@readme comment``` - Embeds the comment.
133
+ ```ruby
134
+ # @readme comment
135
+ ```
109
136
 
110
137
 
111
- [This @readme comment YARD tag](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/comment_tag.rb) embeds the below code snippet because `{@readme ReadmeYard::CommentTag.format_tag_markdown}` is in README_YARD.md.
138
+ This example [@readme comment](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/comment_tag.rb) tag embeds the below code snippet via the `{@readme ReadmeYard::CommentTag.format_tag}` markdown tag.
112
139
 
113
140
  ```ruby
114
141
  #
115
142
  # This comment is in the README because `@readme comment`
116
- # is below, in the source code.
143
+ # is below (in the source code).
117
144
  #
118
145
  ```
119
146
 
120
147
 
121
- ### Source Tag
148
+ ### Embed Ruby code
122
149
 
123
- ```@readme source``` - Embeds the source.
124
150
 
151
+ **Usage:**
125
152
 
126
- [This @readme source YARD tag](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/readme_tag.rb) embeds the below code snippet because `{@readme ReadmeYard::SourceTag.format_tag_markdown}` is in README_YARD.md.
153
+ ```ruby
154
+ # @readme code
155
+ ```
156
+
157
+
158
+ This example [@readme code](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/code_tag.rb) tag embeds the below code snippet via the `{@readme ReadmeYard::CodeTag.format_tag}` markdown tag.
127
159
 
128
160
  ```ruby
129
- def format_tag_markdown(yard_object, _tag)
161
+ def format_tag(yard_object, _tag)
130
162
  ExampleTag.format_ruby(yard_object.source)
131
163
  end
132
164
  ```
133
165
 
134
166
 
167
+ ### Embed Ruby comments and code
135
168
 
136
- ### Object Tag
137
169
 
138
- ```@readme object``` - Embeds the comment and source.
170
+ **Usage:**
139
171
 
172
+ ```ruby
173
+ # @readme source
174
+ ```
140
175
 
141
- [This @readme object YARD tag](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/readme_tag.rb) embeds the below code snippet because `{@readme ReadmeYard::ObjectTag.format_tag_markdown}` is in README_YARD.md.
176
+
177
+ This example [@readme source](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/source_tag.rb) tag embeds the below code snippet via the `{@readme ReadmeYard::SourceTag.format_tag}` markdown tag.
142
178
 
143
179
  ```ruby
144
180
  #
145
- # This method's comment and code is in the README because
146
- # because `@readme object` is below, in the actual source code.
181
+ # The comment and code for ReadmeYard::SourceTag#format_tag
182
+ # is in the README because `@readme source` is below (in the source code).
147
183
  #
148
- def format_tag_markdown(yard_object, _tag)
184
+ def format_tag(yard_object, _tag)
149
185
  text = CommentTag.format_docstring_as_comment(yard_object)
150
186
  text << "\n#{yard_object.source}"
151
187
  ExampleTag.format_ruby(text)
@@ -153,27 +189,99 @@ end
153
189
  ```
154
190
 
155
191
 
192
+ ### Embed a Ruby value as a Ruby code block
193
+
194
+
195
+ **Usage:**
196
+
197
+ ```ruby
198
+ # @readme value
199
+ ```
200
+
201
+
202
+ This example [@readme value](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/value_tag.rb) tag embeds the below code snippet via the `{@value ReadmeYard::ValueTag::EXAMPLE}` markdown tag.
203
+
204
+ ```ruby
205
+ { key: "value" }.freeze
206
+ ```
207
+
208
+ ### Embed a Ruby string as normal text
209
+
210
+
211
+ **Usage:**
212
+
213
+ Because a [@readme string](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard/string_tag.rb) tag:
214
+
215
+ ```ruby
216
+ # @readme string
217
+ ```
218
+
219
+
220
+ Is located above this constant:
221
+
222
+ ```ruby
223
+ XZAMPLE = <<~STRING
224
+ I heard you like self-documenting Ruby, so I wrote
225
+ self-documenting Ruby for your self-documenting Ruby.
226
+ STRING
227
+ ```
228
+
229
+
230
+ We see can see its string value as simple text below:
231
+
232
+ I heard you like self-documenting Ruby, so I wrote
233
+ self-documenting Ruby for your self-documenting Ruby.
234
+
235
+ ---
236
+
237
+ ## Standalone Tag Usage
238
+
239
+ While using the `@readme` tag in your source code is recommended because it makes the README's dependency on source code explicit, sometimes it's useful to embed source code snippets directly without it. This is especially valuable when a source object can only contain one `@readme` tag, but you want to highlight multiple aspects of the object.
240
+
241
+ You can use any of these tags directly in README_YARD.md without requiring a corresponding `@readme` tag in the source code:
242
+
243
+ - `{@comment ObjectPath}` - Embeds comments only
244
+ - `{@code ObjectPath}` - Embeds code only
245
+ - `{@source ObjectPath}` - Embeds both comments and code
246
+ - `{@value ObjectPath}` - Embeds a Ruby value as a Ruby code block
247
+ - `{@string ObjectPath}` - Embeds a Ruby string as plain text
248
+
249
+ For example, in the StringTag section above, we used both:
250
+ - `{@code ReadmeYard::StringTag::XZAMPLE}` to show the constant definition
251
+ - `{@string ReadmeYard::StringTag::XZAMPLE}` to display the string value as text
252
+
253
+ The standalone tag usage provides more flexibility when documenting your code and doesn't require modifications to the source files.
156
254
 
157
255
  ---
158
256
 
159
257
  ## Example Tag
160
258
 
161
- **README Tag** syntax: `{@example ObjectPath}`
259
+ **Markdown** syntax: `{@example ObjectPath}`
260
+
261
+ **YARD** syntax: `@example`
262
+
263
+ The Example Tag leverages YARD's standard `@example` tag syntax, allowing you to
264
+ include example code in your README directly from source files. This saves time and
265
+ ensures your README stays in sync with your YARD documentation
162
266
 
163
- **YARD Tag** example: `@example`
267
+
268
+ **Usage:**
164
269
 
165
270
  ```ruby
166
271
  #
167
272
  # @example
168
- # ReadmeYard.hello_world #=> "Hello 🌎 🌍 🌏"
273
+ # ReadmeYard::ExampleTag.hello_world #=> "Hello 🌎 🌍 🌏"
169
274
  #
275
+ def hello_world
276
+ "Hello 🌎 🌍 🌏"
277
+ end
170
278
  ```
171
279
 
172
280
 
173
- Given that the above comment is for the `hello_world` class method, the below example code is generated from placing `{@example ReadmeYard.hello_world}` in README_YARD.md.
281
+ The below example code is generated from `{@example ReadmeYard::ExampleTag.hello_world}` because, as you can see above, the "hello_world" class method has an `@example` tag.
174
282
 
175
283
  ```ruby
176
- ReadmeYard.hello_world #=> "Hello 🌎 🌍 🌏"
284
+ ReadmeYard::ExampleTag.hello_world #=> "Hello 🌎 🌍 🌏"
177
285
  ```
178
286
 
179
287
 
@@ -183,6 +291,8 @@ ReadmeYard.hello_world #=> "Hello 🌎 🌍 🌏"
183
291
 
184
292
  Bug reports and pull requests are welcome on GitHub at https://github.com/mattruzicka/yard-readme.
185
293
 
294
+ If you're interested in contributing, but don't know where to get started, feel free to message me on twitter at [@mattruzicka](https://twitter.com/mattruzicka). I have a lot of ideas!
295
+
186
296
  Thanks for taking the time to think about me, the README.
187
297
 
188
298
  🌿 🥏 🌱 ⚽