Class: LangGraphRB::Send

Inherits:
Object
  • Object
show all
Defined in:
lib/langgraph_rb/command.rb

Overview

Send creates a new parallel execution branch with specific payload

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(to:, payload: {}) ⇒ Send

Returns a new instance of Send.



39
40
41
42
# File 'lib/langgraph_rb/command.rb', line 39

def initialize(to:, payload: {})
  @to = to.to_sym
  @payload = payload || {}
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



37
38
39
# File 'lib/langgraph_rb/command.rb', line 37

def payload
  @payload
end

#toObject (readonly)

Returns the value of attribute to.



37
38
39
# File 'lib/langgraph_rb/command.rb', line 37

def to
  @to
end

Instance Method Details

#inspectObject



48
49
50
# File 'lib/langgraph_rb/command.rb', line 48

def inspect
  to_s
end

#to_sObject



44
45
46
# File 'lib/langgraph_rb/command.rb', line 44

def to_s
  "#<Send to: #{@to}, payload: #{@payload.inspect}>"
end