Class: CARPS::Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/carps/service/interface.rb

Overview

A basic user interface

Subclass this interface to provide commands

Direct Known Subclasses

QuitInterface

Instance Method Summary collapse

Constructor Details

#initializeInterface

Returns a new instance of Interface.



31
32
33
34
# File 'lib/carps/service/interface.rb', line 31

def initialize 
   @commands = {}
   add_command :help, "Displays this help message."
end

Instance Method Details

#runObject



36
37
38
39
40
# File 'lib/carps/service/interface.rb', line 36

def run
   consistent!
   help
   repl
end