Module Tap::App::State
In: lib/tap/app/state.rb

The constants defining the possible App states.

Methods

state_str  

Constants

READY = 0
RUN = 1
STOP = 2
TERMINATE = 3

Public Instance methods

Returns a string corresponding to the input state value. Returns nil for unknown states.

  State.state_str(0)        # => 'READY'
  State.state_str(12)       # => nil

[Source]

    # File lib/tap/app/state.rb, line 17
17:       def state_str(state)
18:         const = constants.find {|const_name| const_get(const_name) == state }
19:         const ? const.to_s : nil
20:       end

[Validate]