Module: Tap::App::State
- Defined in:
- lib/tap/app/state.rb
Overview
The constants defining the possible App states.
Constant Summary collapse
- READY =
0
- RUN =
1
- STOP =
2
- TERMINATE =
3
Class Method Summary collapse
-
.state_str(state) ⇒ Object
Returns a string corresponding to the input state value.
Class Method Details
.state_str(state) ⇒ Object
17 18 19 20 |
# File 'lib/tap/app/state.rb', line 17 def state_str(state) const = constants.find {|const_name| const_get(const_name) == state } const ? const.to_s : nil end |