Module: ORI

Defined in:
lib/ori.rb,
lib/ori/tools.rb,
lib/ori/config.rb,
lib/ori/library.rb,
lib/ori/request.rb,
lib/ori/colorize.rb,
lib/ori/internals.rb,
lib/ori/extensions.rb,
lib/ori/auto_config.rb,
lib/ori/list_method.rb,
lib/ori/extensions/object/ri.rb

Overview

Object-Oriented RI for IRB Console

ORI brings RI documentation right to your IRB console in a simple, consistent and truly object-oriented way.

To enable ORI add to your `~/.irbrc`:

require "rubygems"
require "ori"

Quick test:

$ irb
irb> Array.ri

You should see RI page on Array.

See also:

  • ORI::Extensions::Object#ri

  • ORI::conf

Defined Under Namespace

Modules: Colorize, Extensions, Internals, Tools Classes: AutoConfig, Config, Library, ListMethod, Request

Class Method Summary (collapse)

Class Method Details

+ (Object) conf

Get configuration object to query or set its values. Note that default values are set automatically based on your OS and environment.

ORI.conf.color = true
ORI.conf.frontend = "ri -T -f ansi %s"
ORI.conf.pager = "less -R"
ORI.conf.shell_escape = :unix

See also: ORI::Config.



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/ori.rb', line 36

def self.conf
  @conf ||= begin
    autoconf = AutoConfig.new((k = "host_os") => RbConfig::CONFIG[k])
    Config.new({
      (k = :color) => autoconf.send(k),
      (k = :frontend) => autoconf.send(k),
      (k = :pager) => autoconf.send(k),
      (k = :shell_escape) => autoconf.send(k),
    })
  end
end