Sha256: 4f31719207ceca699b95169c661c0c0bca2f972787c853de772b7eb5137bf18c

Contents?: true

Size: 354 Bytes

Versions: 49

Compression:

Stored size: 354 Bytes

Contents

require 'thor/line_editor/basic'
require 'thor/line_editor/readline'

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

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

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
bundler-1.8.9 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.8 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.15 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.7 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.6 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.14 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.5 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.4 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.3 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.2 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.1 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.0 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.13 lib/bundler/vendor/thor/line_editor.rb
bundler-1.8.0.pre lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.12 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.11 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.10 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.9 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.8 lib/bundler/vendor/thor/line_editor.rb
bundler-1.7.7 lib/bundler/vendor/thor/line_editor.rb