Class: Bundler::Thor::LineEditor::Basic

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb

Direct Known Subclasses

Readline

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prompt, options) ⇒ Basic

Returns a new instance of Basic.


10
11
12
13
# File 'lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb', line 10

def initialize(prompt, options)
  @prompt = prompt
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options


4
5
6
# File 'lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb', line 4

def options
  @options
end

#promptObject (readonly)

Returns the value of attribute prompt


4
5
6
# File 'lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb', line 4

def prompt
  @prompt
end

Class Method Details

.available?Boolean

Returns:

  • (Boolean)

6
7
8
# File 'lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb', line 6

def self.available?
  true
end

Instance Method Details

#readlineObject


15
16
17
18
# File 'lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb', line 15

def readline
  $stdout.print(prompt)
  get_input
end