Class: CARPS::Interface
- Inherits:
-
Object
- Object
- CARPS::Interface
- Defined in:
- lib/carps/service/interface.rb
Overview
A basic user interface
Subclass this interface to provide commands
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ Interface
constructor
A new instance of Interface.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Interface
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
#run ⇒ Object
36 37 38 39 40 |
# File 'lib/carps/service/interface.rb', line 36 def run consistent! help repl end |