Base class for all classes with states
Change state to ‘done’
# File lib/libwebsocket/stateful.rb, line 13 def done @state = 'done' true end
Check if current state is done
# File lib/libwebsocket/stateful.rb, line 19 def done? @state == 'done' end
Return true if current state match given state
# File lib/libwebsocket/stateful.rb, line 8 def state?(val) @state == val end