Class: Brewby::CLI::Application
- Inherits:
-
Application
- Object
- Application
- Brewby::CLI::Application
- Defined in:
- lib/brewby/cli/application.rb
Instance Attribute Summary collapse
-
#ready ⇒ Object
Returns the value of attribute ready.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
- #configure_view ⇒ Object
-
#initialize(options = {}) ⇒ Application
constructor
A new instance of Application.
- #start ⇒ Object
- #start_step(step) ⇒ Object
- #tick ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Application
Returns a new instance of Application.
9 10 11 12 |
# File 'lib/brewby/cli/application.rb', line 9 def initialize = {} super configure_view end |
Instance Attribute Details
#ready ⇒ Object
Returns the value of attribute ready.
7 8 9 |
# File 'lib/brewby/cli/application.rb', line 7 def ready @ready end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
8 9 10 |
# File 'lib/brewby/cli/application.rb', line 8 def view @view end |
Instance Method Details
#configure_view ⇒ Object
14 15 16 |
# File 'lib/brewby/cli/application.rb', line 14 def configure_view @view = Brewby::CLI::Views::Application.new self end |
#start ⇒ Object
18 19 20 21 22 |
# File 'lib/brewby/cli/application.rb', line 18 def start super ensure view.clear if view end |
#start_step(step) ⇒ Object
24 25 26 27 |
# File 'lib/brewby/cli/application.rb', line 24 def start_step step super view.load_step_view step end |
#tick ⇒ Object
29 30 31 32 33 |
# File 'lib/brewby/cli/application.rb', line 29 def tick super view.render view.handle_input end |