Questions tagged [rdoc]

RDoc is the default embedded documentation generator for Ruby. Rdoc generates structured documentation that can be accessed via a web browser or the command-line by analyzing the code and specially formatted comments. Even in the absence of comments, rdoc will generate documentation using a programs structure.

RDoc analyzes Ruby source code to generate documentation. In the absence of comments, Rdoc uses the programs structure to produce documentation. With comments, which can be specially formatted using RDoc Markup, RDoc can create very detailed and useful documentation. Documentation generated via rdoc is accessible through the command line using ri. The RDoc Project's source code repository is hosted via github. RDoc was designed by Dave Thomas.

214 questions
1
vote
1 answer

Documenting classes using labeled lists

I am using Ruby on Rails 3.0.7 and I am writing some documentation for my application using RDoc. In my application file I have this: #[EXAMPLE 1 - Some text.] # # [CASE 1 - Some text.] # # class User < ActiveRecord::Base # has_many…
user502052
  • 14,803
  • 30
  • 109
  • 188
1
vote
2 answers

How to use the `:include:` directive using RDoc?

I am using Ruby on Rails 3.0.7 and I am writing some documentation for my application using RDoc. Since I have not found on the Web some good documentation with examples, what I would like to know is how to use the :include: directive at all. Can…
user502052
  • 14,803
  • 30
  • 109
  • 188
1
vote
1 answer

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 informations. # # @!attribute id # @return [UUID]…
Mateusz Urbański
  • 7,352
  • 15
  • 68
  • 133
1
vote
2 answers

Where to find the Rails API rdoc template

I'm trying to prettify my rdoc documentation, using version 3.5.3. I'm not a fan of the built-in darkfish theme, so I tried to find a way to replace it with the one used by the official Rails API documentation at http://api.rubyonrails.org/, but…
Thilo
  • 17,565
  • 5
  • 68
  • 84
1
vote
0 answers

Is it possible to generate RDoc documentation from Java classes exposed via JRuby?

I have existing Java classes which are exposed to Ruby scripts via JRuby and I would like to be able to provide RDoc-style documentation to the Ruby developers who will be using the java objects. Is it possible to generate RDoc documentation from…
Nathan Voxland
  • 15,453
  • 2
  • 48
  • 64
1
vote
1 answer

How to declare array of a particular type in ruby documentor?

I'd like to declare an array of objects with the exact object class in rubydoc for either a parameter or variable, or for @return. (it must be RDoc?..) The main reason, to make RubyMine (or another IDE) work for autocomplete stuff, clickable…
Kirby
  • 2,847
  • 2
  • 32
  • 42
1
vote
1 answer

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?
Kirby
  • 2,847
  • 2
  • 32
  • 42
1
vote
2 answers

Ruby Yard documentation: how to add a "verbatim" (to generate something like a
 tag)

I want a piece of code, like a hash, to display with fixed typeface on the resulting html. Suppose this is the contents of my file: =begin One example of valid hash to this function is: { :name => "Engelbert", :id => 1345 } =end def f…
ribamar
  • 1,435
  • 1
  • 16
  • 26
1
vote
1 answer

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 and methods themselves) and then devs can add…
1
vote
1 answer

How to document a file with RDoc

After searching the RDoc documentation I can't find how to document a file / a top-level method in RDoc... Suppose I have the following code : ## # File documentation. # File:: foo.rb # Date:: 09/05/2018 ## require 'stuff' ## # Class…
Astariul
  • 2,190
  • 4
  • 24
  • 41
1
vote
2 answers

Best 'classic' RDoc version?

I would like to generate the classic 4-panel, framed RDoc format, with working hyperlinks. Any suggestions of which RDoc to install? My ruby 1.8.6 installation has an RDoc that generates the 4-panel format, but files aren't hyperlinked. My ruby…
Blue
  • 1,196
  • 1
  • 9
  • 7
1
vote
1 answer

How to get fastri working with bundler driven projects

I'd like to get the fastri engine working with bundler driven projects. Anybody know how to do this.
bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
1
vote
1 answer

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 line number before each line, is that even…
graywolf
  • 7,092
  • 7
  • 53
  • 77
1
vote
3 answers

ri output can't be piped into less

I'm running ri version 2.5.8 and ruby 1.9.2. If I try something like ri Enumerable | less, the paging is broken in less. I see output but I can't use CTRL-F or CTRL-B to page back and forward. If I try to, I just see the literal "^F" and "^B"…
dan
  • 43,914
  • 47
  • 153
  • 254
1
vote
1 answer

rdoc, darkfish, and the :call-seq: tag

I'm in the process of documenting a Ruby project with rdoc, and I discovered the darkfish rdoc formatter. I really like it, but the :call-seq: tag no longer works. Instead, it puts the literal string :call-seq: in the documentation and then…
Daisy Sophia Hollman
  • 6,046
  • 6
  • 24
  • 35