Class: Controller
- Inherits:
-
Object
- Object
- Controller
- Defined in:
- lib/controller.rb
Instance Method Summary collapse
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Controller
Returns a new instance of Controller.
5 6 7 8 9 |
# File 'lib/controller.rb', line 5 def initialize connect trap_int @lines = [] end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/controller.rb', line 11 def run if ENV["EMACS"] == "t" emacs_run_loop elsif @options.input_file show File.read(@options.input_file) elsif @options.query show @options.query else run_loop end end |