215 questions
1
vote
1
answer
118
views
Document keys of a hash in an array
Say I have a param declaration like:
# @param [Array<Hash>] work_logs an array of work log elements
How to correctly document the possible keys of each element inside the Array?
I know about @...
0
votes
1
answer
43
views
is it possible to generate documentation for anonymous classes in rdoc
I would like to document a few methods in an anonymous class for rdoc.
I know that alternative documetation tool exists, such as yard, but not sure the project owners are ready for change they ...
0
votes
0
answers
94
views
How to include only specific directories in rdoc?
I'm using rdoc to generate API documentation for my Ruby program, but it's pulling in lots of files I don't care to include in the documentation. I see that there is an option to exclude files by ...
0
votes
1
answer
54
views
Stuck with rdoc: Any way to add indentation to call-seq?
I know I should use YARD. Not an option in this environment.
So I'm using rdoc and call-seq is generally been great, but I want to add indentation for a call-seq that is always used in a block/yield ...
1
vote
2
answers
1k
views
YARD how to document a @param of Array<String> type which could also be a blank array?
The following is a snippet of a method that accepts an array of strings or a blank array([]):
# @param [Array<String>] bar
def foo(bar)
if bar.empty?
# Do this
else
# Do that
end
...
2
votes
1
answer
266
views
Roxygen link to the "[" method
In my R package, I implemented the [ (indexing) operator for my class:
#' Some title
#' @export
setMethod("[", list(x="MyClass"), function(x, i, j, ...) {
# Some code
})
Now, in ...
1
vote
2
answers
1k
views
Documenting Ruby on Rails models with YARD
I'm using YARD for my Ruby on Rails application documentation.
I have simple model that looks like this:
# frozen_string_literal: true
# {Patient} is model responsible for storing patient personal ...
0
votes
1
answer
138
views
How do I install ri documentation in JRuby?
I installed JRuby 9.2.11.1 on a Windows system.
After the installation has successfully completed, no ri documentation for core/stdlib is present.
For instance:
C:\>ri Array
Nothing known about ...
0
votes
1
answer
66
views
Is there a way to force RDoc to not style words, which correspond to classes or modules?
I am trying to write documentation to one of my classes using RDoc and I have the following problem:
This is my source:
module Native
module Facebook
# Service, which starts(schedules) Native ...
1
vote
1
answer
88
views
Inline RubyDocumentor line like in PHP?
In PHP we can describe any variable and get proper auto-complete in an IDE like PHPStorm.
/** @var MyClass $my */
$my = $this->getMy();
Is there some way to make it in RubyMine by using RDoc?
1
vote
1
answer
421
views
How do you run rdoc on single files without overwriting all other files?
I am working on a very large rails project and I want to standardize the usage of rdoc in the codebase. I figured I could run it once over the whole project (to at least generate docs for the classes ...
5
votes
1
answer
2k
views
Line continuation in rdoc
I have inherited a bunch of Ruby code with rdoc comments, but many of the options and attributes are multi-line, such as:
# +param+:: Here is a parameter with a really long description
# that won't ...
1
vote
1
answer
103
views
How to display line numbers in rdoc?
How can I get rdoc to display line numbers? I know there is -N switch, however even with it I get just
# File config.rb, line 40
def port
@conf[:port].to_a || DEFAULT_PORT
end
I would like to have ...
4
votes
0
answers
194
views
How do I force rdoc to document a concern's class_method(s) as class methods?
I'm writing a gem for ActiveRecord that provides a Concern. One of them installs a singleton method (aka class method), and I want to document it with rdoc. After reading the rdoc documentation, I ...
0
votes
0
answers
174
views
How to convert an RDoc file to a single HTML file?
I'd like to convert some RDoc files to corresponding single-page HTML files. The rdoc converter produces a subdirectory and multiple files, and I don't see any command-line option to change that ...
4
votes
1
answer
2k
views
`require': cannot load such file -- rdoc/usage (LoadError)
I'm getting this error when running my script:
`require': cannot load such file -- rdoc/usage (LoadError)
from
/Users/S/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/...
0
votes
1
answer
176
views
Rdoc, YARD and irb, using intern method on an array?
I was just trying to generate the documentation for my gem, and upon running either rdoc or yard I got the error
undefined method `intern' for []:Array
What is going on? I've trying reinstalling ...
3
votes
1
answer
4k
views
Rake aborted! Don't know how to build task 'doc:app'
The official documentation indicates that I should be able to build documentation for my application using rake doc:app, but when I run the command in Rails 5 I get the following output:
bwerth@...
3
votes
1
answer
453
views
How can I list the undocumented modules/classes/constants/methods with rdoc?
I have a Rails app that I am documenting with RDOC. When I run the rake rdoc command, it tells me:
Classes: 96 ( 6 undocumented)
Modules: 22 ( 14 undocumented)
Constants: 12 ( 11 ...
1
vote
0
answers
99
views
How to ignore gems when running rake doc:rails?
When I run rake doc:rails it fails with an error don't know how to build task /Users/bigtunacan/.rvm/gems/ruby-1.9.3-p547@rails3/gems/rspec-activemodel-mocks-1.0.1/README.rdoc
This appears then that ...
11
votes
2
answers
290
views
How to document AngularJS + Ruby on Rails app? [closed]
I'm using yard to generate my documentation for Rails apps from an rdoc file. There are AngularJS documentation generators, but how could they be connected to generate one coherent document for an ...
0
votes
1
answer
343
views
bundle install fails with rdoc Internal Server Error
while trying to install a Ruby application with Bundler, the dependent rdoc gem fails with an Internal Server Error:
user@machine:/home/user/someapp# bundle
Fetching gem metadata from http://rubygems....
2
votes
1
answer
112
views
Pushing rdoc documentation to rubygems.org
So I wrote a small ruby gem and documented it with rdoc. But I don't know how to get my documentation onto rubygems. Anyone know?
1
vote
1
answer
527
views
Replacing RDoc with YARD in Rails 4.2
Is it possible to replace RDoc with YARD in Rails 4.2? I'd like rake doc:app to invoke YARD rather than RDoc.
In my Gemfile I replaced sdoc with YARD (gem 'yard', '~> 0.8.0', group: :doc) with no ...
8
votes
1
answer
797
views
How do I document generated classes in Yard?
I have a class that I create from a factory function like this:
Cake = MyProject.Struct(:type, :price)
In Yard, it's simply displayed along with my constants:
Cake =
Struct(:type, :price)
...