Module: Ripl

Defined in:
lib/ripl.rb,
lib/ripl/version.rb

Defined Under Namespace

Modules: Commands, Completion, History, Readline Classes: Runner, Shell

Constant Summary collapse

VERSION =
'0.7.1'

Class Method Summary collapse

Class Method Details

.configObject


2
3
4
5
# File 'lib/ripl.rb', line 2

def self.config
  @config ||= { :readline => true, :riplrc => ENV['RIPL_RC'] || '~/.riplrc',
    :completion => {} }
end

.pluginsObject


10
11
12
13
14
# File 'lib/ripl.rb', line 10

def self.plugins
  file =  File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
  $".map {|e| e[/ripl\/[^\/]+$/] }.compact -
    Dir["#{File.dirname(file)}/ripl/*.rb"].map {|e| e[/ripl\/[^\/]+$/] }
end

.shell(options = {}) ⇒ Object


16
17
18
# File 'lib/ripl.rb', line 16

def self.shell(options={})
  @shell ||= Shell.create(config.merge!(options))
end

.start(*args) ⇒ Object


7
# File 'lib/ripl.rb', line 7

def self.start(*args) Runner.start(*args) end

.started?Boolean

Returns:

  • (Boolean)

8
# File 'lib/ripl.rb', line 8

def self.started?()   instance_variable_defined?(:@shell) end