File: ri

package info (click to toggle)
jruby 1.5.6-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 45,088 kB
  • ctags: 77,093
  • sloc: ruby: 398,491; java: 170,202; yacc: 3,782; xml: 2,529; sh: 299; tcl: 40; makefile: 35; ansic: 23
file content (54 lines) | stat: -rwxr-xr-x 1,584 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env jruby
# usage:
#
#   ri  name...
#
# where name can be 
#
#   Class | Class::method | Class#method | Class.method | method
#
# All names may be abbreviated to their minimum unbiguous form. If a name
# _is_ ambiguous, all valid options will be listed.
#
# The form '.' method matches either class or instance methods, while 
# #method matches only instance and ::method matches only class methods.
#
#
# == Installing Documentation
#
# 'ri' uses a database of documentation built by the RDoc utility.
# 
# So, how do you install this documentation on your system?
# It depends on how you installed Ruby.
#
# <em>If you installed Ruby from source files</em> (that is, if it some point
# you typed 'make' during the process :), you can install the RDoc
# documentation yourself. Just go back to the place where you have 
# your Ruby source and type
#
#    make install-doc
#
# You'll probably need to do this as a superuser, as the documentation
# is installed in the Ruby target tree (normally somewhere under 
# <tt>/usr/local</tt>.
#
# <em>If you installed Ruby from a binary distribution</em> (perhaps
# using a one-click installer, or using some other packaging system),
# then the team that produced the package probably forgot to package
# the documentation as well. Contact them, and see if they can add
# it to the next release.
#

# JRUBY-3413 and JRUBY-4231
ARGV << "--no-pager"

begin
  # Ruby 1.8 mode
  require 'rdoc/ri/ri_driver'
  ri = RiDriver.new
  ri.process_args
rescue LoadError
  # Ruby 1.9 mode
  require 'rdoc/ri/driver'
  RDoc::RI::Driver.run
end