Class: LangGraphRB::Interrupt

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

Overview

Interrupt execution and wait for human input

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message: "Human input required", data: {}) ⇒ Interrupt

Returns a new instance of Interrupt.



84
85
86
87
# File 'lib/langgraph_rb/command.rb', line 84

def initialize(message: "Human input required", data: {})
  @message = message
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



82
83
84
# File 'lib/langgraph_rb/command.rb', line 82

def data
  @data
end

#messageObject (readonly)

Returns the value of attribute message.



82
83
84
# File 'lib/langgraph_rb/command.rb', line 82

def message
  @message
end

Instance Method Details

#inspectObject



93
94
95
# File 'lib/langgraph_rb/command.rb', line 93

def inspect
  to_s
end

#to_sObject



89
90
91
# File 'lib/langgraph_rb/command.rb', line 89

def to_s
  "#<Interrupt: #{@message}>"
end