Class: EventStoreSubscriptions::ObjectState

Inherits:
Object
  • Object
show all
Defined in:
lib/event_store_subscriptions/object_state.rb

Overview

Defines various states. It is used to set and get current object’s state.

Constant Summary collapse

STATES =
%i(initial running halting stopped dead).freeze

Instance Method Summary collapse

Constructor Details

#initializeObjectState

Returns a new instance of ObjectState.



12
13
14
# File 'lib/event_store_subscriptions/object_state.rb', line 12

def initialize
  initial!
end

Instance Method Details

#to_sString

Returns string representation of the #state.

Returns:

  • (String)

    string representation of the #state



31
32
33
# File 'lib/event_store_subscriptions/object_state.rb', line 31

def to_s
  state.to_s
end