Module: Thor::LineEditor

Defined in:
lib/bundler/vendor/thor/line_editor.rb,
lib/bundler/vendor/thor/line_editor/basic.rb,
lib/bundler/vendor/thor/line_editor/readline.rb

Defined Under Namespace

Classes: Basic, Readline

Class Method Summary collapse

Class Method Details

.best_availableObject


10
11
12
13
14
15
# File 'lib/bundler/vendor/thor/line_editor.rb', line 10

def self.best_available
  [
    Thor::LineEditor::Readline,
    Thor::LineEditor::Basic
  ].detect(&:available?)
end

.readline(prompt, options = {}) ⇒ Object


6
7
8
# File 'lib/bundler/vendor/thor/line_editor.rb', line 6

def self.readline(prompt, options={})
  best_available.new(prompt, options).readline
end