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
qiita_org-0.1.24 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.23 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.23 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.22 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.22 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.21 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.21 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.20 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.20 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.19 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.19 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.18 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.18 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.17 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.17 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.16 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.16 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.15 gems/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.15 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb
qiita_org-0.1.14 .bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb