-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathripl.rb
More file actions
29 lines (24 loc) · 828 Bytes
/
Copy pathripl.rb
File metadata and controls
29 lines (24 loc) · 828 Bytes
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
module Ripl
def self.config
local_riplrc = File.join(Dir.pwd, '.riplrc')
riplrc = ENV['RIPL_RC'] || (local_riplrc if File.exist?(local_riplrc)) || '~/.riplrc'
@config ||= {:readline => true, :riplrc => riplrc, :completion => {}}
end
def self.start(*args) Runner.start(*args) end
def self.started?() instance_variable_defined?(:@shell) end
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
def self.shell(options={})
@shell ||= Shell.create(config.merge!(options))
end
module Commands
class<<self; public :include; end
end
end
require 'ripl/shell'
require 'ripl/runner'
require 'ripl/history'
require 'ripl/version'