Sha256: b909dd8639abb08c98202574bb3f89da78f3f54e45c35f6ce4d4fc0a6816d2f3

Contents?: true

Size: 364 Bytes

Versions: 202

Compression:

Stored size: 364 Bytes

Contents

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

202 entries across 155 versions & 22 rubygems

Version Path
thor-1.0.1 lib/thor/line_editor.rb
thor-1.0.0 lib/thor/line_editor.rb