Module: Clin::LineReader
- Defined in:
- lib/clin/line_reader.rb
Overview
Handle to delegate the scan method to the right module. It will use Readline unless the disabled using Clin.use_readline = false
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.readers ⇒ Object
10 11 12 |
# File 'lib/clin/line_reader.rb', line 10 def self.readers @readers ||= [Clin::LineReader::Readline, Clin::LineReader::Basic] end |
.scan(shell, statement, options = {}) ⇒ Object
6 7 8 |
# File 'lib/clin/line_reader.rb', line 6 def self.scan(shell, statement, = {}) readers.detect(&:available?).new(shell, statement, ).readline end |