YARD is the only Ruby documentation tool that supports storing metadata alongside your documentation. This metadata can be used to create consistent documentation in any format you wish.
Questions tagged [yardoc]
11 questions
5
votes
0 answers
Document a method returning a lambda
I have an object with a method returning a lambda:
class Book
def mark_page(marker_color)
lambda do |page|
page.mark(marker_color)
end
end
end
And I want to document this Book#mark_page method using yardoc syntax. However, I…

Ulysse BN
- 10,116
- 7
- 54
- 82
5
votes
1 answer
Remove rubocop comments from Yardoc documentation
We are using Yardoc to create the HTML documentation for a number of gems and my company's apps. We are also using Rubocop to for style guide compliance.
The issue I am running into is that we have to enable/disable some of the method metrics and…

HMCFletch
- 1,046
- 1
- 10
- 19
5
votes
2 answers
YARD for keyword arguments with default hash
I have a method that looks like this:
def get_endpoint(params: {})
end
I want the caller of this method to be able to pass in a few optional parameters.
I want to write YARD documentation to support this and if I wasn't using keyword arguments I'd…

Anthony
- 15,435
- 4
- 39
- 69
2
votes
1 answer
YARD generates wrong references to files
I use YARD to generate a doc for ruby project. This project includes a README.md file and looks like below:
# MyTool

user2319066
- 195
- 18
2
votes
1 answer
How to hide view source code from yard documentation?
Iam using yard for documentation in my project but i don't want to show my source source to the users. Is there a way to hide source code in yard.

Mothirajha
- 1,033
- 1
- 10
- 18
1
vote
1 answer
rake yard VS yardoc
I'm getting different results when I run yardoc vs when I run rake yard
$ yardoc
Files: 123
Modules: 4 ( 0 undocumented)
Classes: 120 ( 0 undocumented)
Constants: 11 ( 0 undocumented)
Attributes: 16 ( 0…

Okomikeruko
- 1,123
- 10
- 22
1
vote
0 answers
Yard graph places class outside of it's module
I have a ruby project with a module and a class defined in the module:
a.rb
a/b.rb
File a.rb contains:
require 'a/b'
module A
end
File a/b.rb contains:
module A
class B
end
end
When I run yardoc ** and then yard graph --full --dependencies |…

mirelon
- 4,896
- 6
- 40
- 70
0
votes
0 answers
Modify yard-serverspec gem handler to allow hierarchical documenting of serverspec files
I'm currently trying to document my serverspec tests using yardoc. For this i've installed the yard-serverspec-plugin rubygem which does its job not that bad.
But i have one problem. The rubygem handles the "describe" and the "context" the same way…

linux guy
- 27
- 1
- 6
0
votes
0 answers
service to auto generate and host yardocs?
Is there a service that can pull from our github repo and generate and host our yard docs?
It seems my team never looks at our docs since they have to generate them locally and then navigate to them. This is also causing them to stop writing helpful…

Deekor
- 9,144
- 16
- 69
- 121
0
votes
2 answers
yard server generate Documentation from github repo
Is there any way to generate Yard documentation from github projects.
We have several cookbook with Yard tags ready for parsing with Yard and generating documentation.
Any Ideas?
Thanks
Biswajit

Biswajit Das
- 644
- 7
- 26
0
votes
1 answer
yardoc: exclude comments from documentation
in Ruby, several times I'll separate sections of code with the following, so that I can quickly scan the code for an section of code.
... methods
#
# ------------------------------- (Some message)
#
... methods
This is not intended for yarddoc…

Daniel
- 7,006
- 7
- 43
- 49