Class: FoggyBottom::Console
- Inherits:
-
Object
- Object
- FoggyBottom::Console
- Defined in:
- lib/foggy_bottom/console.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#initialize(api) ⇒ Console
constructor
A new instance of Console.
- #run ⇒ Object
Constructor Details
#initialize(api) ⇒ Console
Returns a new instance of Console.
6 7 8 |
# File 'lib/foggy_bottom/console.rb', line 6 def initialize(api) @api = api end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
5 6 7 |
# File 'lib/foggy_bottom/console.rb', line 5 def api @api end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/foggy_bottom/console.rb', line 10 def run while( cmd = ) do case cmd when :search search(get("Terms")) when :resolve resolve(get("Case ID")) when :status_list puts FoggyBottom::Status.all(api).inspect when :quit exit 0 else puts " Unknown choice" end end end |