Sha256: 9fe682af8af4815da7fca953c501ee742db37dabe70b46bee15c36553ce44139

Contents?: true

Size: 391 Bytes

Versions: 333

Compression:

Stored size: 391 Bytes

Contents

require_relative "line_editor/basic"
require_relative "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

333 entries across 333 versions & 8 rubygems

Version Path
bundler-2.5.21 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.20 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.20 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.19 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.19 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.18 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.18 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.17 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.17 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.16 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.16 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.15 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.15 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.14 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.14 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.13 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.13 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.12 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.12 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.10 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb