Class: AgUiProtocol::Core::Events::RunFinishedSuccessOutcome
- Inherits:
-
Types::Model
- Object
- Types::Model
- AgUiProtocol::Core::Events::RunFinishedSuccessOutcome
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Represents a successful outcome for a run.
The ‘type` discriminator is enforced — only “success” is accepted (or nil for default). The optional `type:` kwarg exists to support round-trip deserialization from `to_h` output (which emits `type: “success”`); supplying any other value raises ArgumentError.
“‘ruby outcome = AgUiProtocol::Core::Events::RunFinishedSuccessOutcome.new “`
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type: nil) ⇒ RunFinishedSuccessOutcome
constructor
A new instance of RunFinishedSuccessOutcome.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(type: nil) ⇒ RunFinishedSuccessOutcome
Returns a new instance of RunFinishedSuccessOutcome.
943 944 945 946 947 948 949 |
# File 'lib/ag_ui_protocol/core/events.rb', line 943 def initialize(type: nil) if !type.nil? && type != "success" raise ArgumentError, "RunFinishedSuccessOutcome.type must be \"success\"" end @type = "success" end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
939 940 941 |
# File 'lib/ag_ui_protocol/core/events.rb', line 939 def type @type end |
Instance Method Details
#to_h ⇒ Object
952 953 954 |
# File 'lib/ag_ui_protocol/core/events.rb', line 952 def to_h { type: @type } end |