In Files

  • bundler/vendor/thor/lib/thor/line_editor/readline.rb

Class/Module Index [+]

Quicksearch

Bundler::Thor::LineEditor::Readline

Public Class Methods

available?() click to toggle source
 
               # File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 9
def self.available?
  Object.const_defined?(:Readline)
end
            

Public Instance Methods

readline() click to toggle source
 
               # File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 13
def readline
  if echo?
    ::Readline.completion_append_character = nil
    # Ruby 1.8.7 does not allow Readline.completion_proc= to receive nil.
    if complete = completion_proc
      ::Readline.completion_proc = complete
    end
    ::Readline.readline(prompt, add_to_history?)
  else
    super
  end
end