Class: Electr::BaseReader
- Inherits:
-
Object
- Object
- Electr::BaseReader
- Defined in:
- lib/electr/repl/base_reader.rb
Overview
Responsible of the terminal interface, that is printing the prompt and reading a line of code (I know, I know, there is an «and» in the description…).
Instance Method Summary collapse
-
#initialize(prompt = "No prompt defined> ") ⇒ BaseReader
constructor
A new instance of BaseReader.
- #run ⇒ Object
Constructor Details
#initialize(prompt = "No prompt defined> ") ⇒ BaseReader
Returns a new instance of BaseReader.
8 9 10 |
# File 'lib/electr/repl/base_reader.rb', line 8 def initialize(prompt = "No prompt defined> ") @prompt = prompt end |
Instance Method Details
#run ⇒ Object
12 13 14 |
# File 'lib/electr/repl/base_reader.rb', line 12 def run raise(NotImplementedError) end |