Class: Ovto::App
- Inherits:
-
Object
- Object
- Ovto::App
- Defined in:
- lib/ovto/app.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
-
.run(*args) ⇒ Object
Create an App and start it.
Instance Method Summary collapse
-
#_set_state(new_state) ⇒ Object
Internal use only.
- #actions ⇒ Object
-
#initialize ⇒ App
constructor
A new instance of App.
-
#run(*args) ⇒ Object
Start this app.
-
#setup ⇒ Object
Called when this app is started.
Constructor Details
#initialize ⇒ App
Returns a new instance of App
8 9 10 11 |
# File 'lib/ovto/app.rb', line 8 def initialize @state = self.class.const_get('State').new @wired_actions = nil end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state
12 13 14 |
# File 'lib/ovto/app.rb', line 12 def state @state end |
Class Method Details
.run(*args) ⇒ Object
Create an App and start it
4 5 6 |
# File 'lib/ovto/app.rb', line 4 def self.run(*args) new.run(*args) end |
Instance Method Details
#_set_state(new_state) ⇒ Object
Internal use only
19 20 21 |
# File 'lib/ovto/app.rb', line 19 def _set_state(new_state) @state = new_state end |
#actions ⇒ Object
14 15 16 |
# File 'lib/ovto/app.rb', line 14 def actions @wired_actions end |
#run(*args) ⇒ Object
Start this app
24 25 26 |
# File 'lib/ovto/app.rb', line 24 def run(*args) Ovto.log_error{ _run(*args) } end |
#setup ⇒ Object
Called when this app is started
29 30 31 |
# File 'lib/ovto/app.rb', line 29 def setup # override this if needed end |