Class: GraphAgent::Graph::MessagesState

Inherits:
State::Schema show all
Defined in:
lib/graph_agent/graph/message_graph.rb

Instance Attribute Summary

Attributes inherited from State::Schema

#fields

Instance Method Summary collapse

Methods inherited from State::Schema

#apply, #field, #initial_state

Constructor Details

#initializeMessagesState

Returns a new instance of MessagesState.



6
7
8
9
# File 'lib/graph_agent/graph/message_graph.rb', line 6

def initialize
  super
  field :messages, type: Array, reducer: GraphAgent::Reducers.method(:add_messages), default: []
end