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
2
votes
1 answer

How do I prevent RDoc from parsing a URL?

Assume that I have the follow class. class Foo # I want the following to appear as-is in my documentation, not as an anchor tag. # # http://www.google.com/ # def bar puts "bar" end end And then I run it through rdoc. $ rdoc…
jdl
  • 17,702
  • 4
  • 51
  • 54
2
votes
0 answers

Ruby/Rails document generator: How to convert the HTML to PDF

I am using YARD gem with my Ruby code. 1: How can I use the yardoc -query to create a document that has all classes which contain a particular method. 2: yardoc --one-file -> Generates output as a single file (.html) This file contains…
KavitaC
  • 635
  • 7
  • 29
2
votes
1 answer

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?
TomP
  • 133
  • 1
  • 2
  • 12
2
votes
1 answer

rdoc2.2 file not found error during make of openwsman 2.4.12 (and 2.4.10)

I'm trying to compile openwsman 2.4.12 (and 2.4.10) on a CentOS 7 system and am running into the error below. I've also duplicated the error on a RHEL 7 system as well and don't know what to make of it. It seems to be erroring on rdoc and trying to…
akitosh
  • 73
  • 7
2
votes
2 answers

Documenting multiple attributes using rdoc

Is there a way to document each of the following attributes without breaking them into separate declarations? attr_accessor :a, :b, :c As opposed to: # description for a attr_accessor :a # description for b attr_accessor :b # description for…
Gilad Naaman
  • 6,390
  • 15
  • 52
  • 82
2
votes
2 answers

How to add line break in rdoc

I have a code and comments for RDoc like this: # first line comment # second line comment def foo end When I output document by rdoc foo.rb, then line break are ignored in HTML file. To add line break I can write like: # first line comment
#…
ironsand
  • 14,329
  • 17
  • 83
  • 176
2
votes
2 answers

How to read rdoc in Emacs

I'm now using to read RDoc gem server command. But I want to read document in Emacs. I found a emacs lisp for it called [yari][1], but it doesn't worked in my environment. I called a function yari and typed in the minibuffer yari: Array, but result…
ironsand
  • 14,329
  • 17
  • 83
  • 176
2
votes
1 answer

YARD equivalent for RDoc Sections :

There is an equivalent to RDoc sections, With YARD ? See http://www.ruby-doc.org/stdlib-1.9.3/libdoc/rdoc/rdoc/RDoc/Context/Section.html I want to build categorized API, and section could be the good way to do it.
Romain
  • 451
  • 4
  • 13
2
votes
2 answers

Why do I get "conflicting chdir during another chdir block" when updating Rubygems on Mountain Lion?

Is there any way to revert back to the version of RubyGems that comes with Mountain Lion? The reason I ask is that with every gem I install I receive the following…
tstrokes
  • 182
  • 1
  • 1
  • 8
2
votes
1 answer

How to make rdoc link to a method with equal sign

In one file I have module Adapter ## # :method: avatar ## # :method: avatar=(value) end In another file I want to have links to these methods: # Adapter#avatar # this generates a valid link to another page # Adapter#avatar= …
ujifgc
  • 2,215
  • 2
  • 19
  • 21
2
votes
1 answer

Change a RDoc template for generating Rails app documentation

I have just added some documentation to my Rails 3.2.13 app. I can generate the documentation just fine (running RDoc 3.12.2) by using a rake task: #…
Christoffer Reijer
  • 1,925
  • 2
  • 21
  • 40
2
votes
1 answer

How to generate documentation for models in rails application?

I want to generate documentation for my rails application. The application has models with relationship(e.g. has_many relation) and I am looking for a way to generate documentation that shows the relation between models. Ideally, with some graphs…
amjad
  • 2,876
  • 7
  • 26
  • 43
2
votes
2 answers

Can uninstalling rdoc make Ubuntu safe from the Ruby RDoc XSS vulnerability?

I've just read http://www.ruby-lang.org/en/news/2013/02/06/rdoc-xss-cve-2013-0256/ , a report about an XSS exploit in RDoc. I'm on Ubuntu 12.04, and I doubt Ubuntu will be dealing with this vulnerability any time soon. Will deleting all RDoc…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
2
votes
0 answers

Completely replace rdoc by yard for gem install/server

is there a way to completely replace rdoc by yard, even when installing a gem? As it is now, gem server has only access to rdoc-generated docs. In some cases like the FFI-gem, the documentation is written with yard, trying to read the rdoc-generated…
NobbZ
  • 1,360
  • 3
  • 15
  • 30
2
votes
1 answer

Ruby regular expression method !~

I don't remember where I learned the !~ method of the String class. However I know it compares a string to a regex and check whether the string not match the regex. See my below example. C:\>irb irb(main):001:0> "abba" =~ /(\w)(\w)\2\1/i =>…
Just a learner
  • 26,690
  • 50
  • 155
  • 234