Sha256: 9fe682af8af4815da7fca953c501ee742db37dabe70b46bee15c36553ce44139

Contents?: true

Size: 391 Bytes

Versions: 330

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

330 entries across 330 versions & 7 rubygems

Version Path
rubygems-update-3.6.3 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.6.3 lib/bundler/vendor/thor/lib/thor/line_editor.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/bundler-2.5.5/lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.6.2 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.6.2 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.6.1 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.6.1 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.6.0 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.6.0 lib/bundler/vendor/thor/lib/thor/line_editor.rb
direct7-0.0.18 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/line_editor.rb
direct7-0.0.17 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.23 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.23 lib/bundler/vendor/thor/lib/thor/line_editor.rb
direct7-0.0.16 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.22 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
bundler-2.5.22 lib/bundler/vendor/thor/lib/thor/line_editor.rb
rubygems-update-3.5.21 bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb
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