Sha256: 3c31785b973484efa5b78d44072cf983c2cffacf54a417df72fae68a531b4c87

Contents?: true

Size: 383 Bytes

Versions: 4

Compression:

Stored size: 383 Bytes

Contents

require "thor/line_editor/basic"
require "thor/line_editor/readline"

class Bundler::Thor
  module LineEditor
    def self.readline(prompt, options = {})
      best_available.new(prompt, options).readline
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bundler-1.9.0 lib/bundler/vendor/thor-0.19.1/lib/thor/line_editor.rb
bundler-1.9.0.pre.1 lib/bundler/vendor/thor-0.19.1/lib/thor/line_editor.rb
bundler-1.9.0.rc lib/bundler/vendor/thor-0.19.1/lib/thor/line_editor.rb
bundler-1.9.0.pre lib/bundler/vendor/thor-0.19.1/lib/thor/line_editor.rb