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.4.0'

Class Method Summary collapse

Class Method Details

.configObject



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

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

.pluginsObject



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

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



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

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

.start(*args) ⇒ Object



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

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

.started?Boolean

Returns:

  • (Boolean)


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

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