@@ -134,7 +134,7 @@ gems further up in the list to your Gemfile.
134
134
There are a couple of ways to use YARD. The first is via command-line, and the
135
135
second is the Rake task.
136
136
137
- ** 1. yard Command-line Tool**
137
+ ### 1. yard Command-line Tool
138
138
139
139
YARD comes packaged with a executable named ` yard ` which can control the many
140
140
functions of YARD, including generating documentation, graphs running the YARD
@@ -147,7 +147,7 @@ $ yard --help
147
147
Plugins can also add commands to the ` yard ` executable to provide extra
148
148
functionality.
149
149
150
- ### Generating Documentation
150
+ #### Generating Documentation
151
151
152
152
<span class =" note " >The ` yardoc ` executable is a shortcut for ` yard doc ` .</span >
153
153
@@ -194,7 +194,7 @@ switches separated by whitespace (newlines or space) to pass to yardoc whenever
194
194
it is run. A full overview of the ` .yardopts ` file can be found in
195
195
[ YARD::CLI::Yardoc] ( https://rubydoc.info/gems/yard/YARD/CLI/Yardoc#label-Options+File+-28.yardopts-29 ) .
196
196
197
- ### Queries
197
+ #### Queries
198
198
199
199
The ` yardoc ` tool also supports a ` --query ` argument to only include objects
200
200
that match a certain data or meta-data query. The query syntax is Ruby, though a
@@ -221,7 +221,7 @@ following two lines both check for the existence of a return and param tag:
221
221
222
222
For more information about the query syntax, see the {YARD::Verifier} class.
223
223
224
- ** 2. Rake Task**
224
+ ### 2. Rake Task
225
225
226
226
The second most obvious is to generate docs via a Rake task. You can do this by
227
227
adding the following to your ` Rakefile ` :
@@ -247,7 +247,7 @@ environment variable:
247
247
$ rake yard OPTS=' --any --extra --opts'
248
248
```
249
249
250
- ** 3. ` yri ` RI Implementation**
250
+ ### 3. ` yri ` RI Implementation
251
251
252
252
The yri binary will use the cached .yardoc database to give you quick ri-style
253
253
access to your documentation. It's way faster than ri but currently does not
@@ -271,7 +271,7 @@ $ yard gems
271
271
If you don't have sudo access, it will write these files to your ` ~/.yard `
272
272
directory. ` yri ` will also cache lookups there.
273
273
274
- ** 4. ` yard server ` Documentation Server**
274
+ ### 4. ` yard server ` Documentation Server
275
275
276
276
The ` yard server ` command serves documentation for a local project or all
277
277
installed RubyGems. To serve documentation for a project you are working on,
@@ -285,14 +285,14 @@ And the project inside the current directory will be parsed (if the source has
285
285
not yet been scanned by YARD) and served at
286
286
[ http://localhost:8808 ] ( http://localhost:8808 ) .
287
287
288
- ### Live Reloading
288
+ #### Live Reloading
289
289
290
290
If you want to serve documentation on a project while you document it so that
291
291
you can preview the results, simply pass ` --reload ` (` -r ` ) to the above command
292
292
and YARD will reload any changed files on each request. This will allow you to
293
293
change any documentation in the source and refresh to see the new contents.
294
294
295
- ### Serving Gems
295
+ #### Serving Gems
296
296
297
297
To serve documentation for all installed gems, call:
298
298
@@ -304,7 +304,7 @@ This will also automatically build documentation for any gems that have not been
304
304
previously scanned. Note that in this case there will be a slight delay between
305
305
the first request of a newly parsed gem.
306
306
307
- ** 5. ` yard graph ` Graphviz Generator**
307
+ ### 5. ` yard graph ` Graphviz Generator
308
308
309
309
You can use ` yard graph ` to generate dot graphs of your code. This, of course,
310
310
requires [ Graphviz] ( http://www.graphviz.org ) and the ` dot ` binary. By default
0 commit comments