Class: Electr::BaseReader

Inherits:
Object
  • Object
show all
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…).

Direct Known Subclasses

ASTReader, Reader

Instance Method Summary collapse

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

#runObject

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/electr/repl/base_reader.rb', line 12

def run
  raise(NotImplementedError)
end