Class: SimpleAcp::Models::AwaitResume Abstract
- Defined in:
- lib/simple_acp/models/await.rb
Overview
This class is abstract.
Subclass for specific resume types
Base class for await resume payloads.
Clients send resume payloads to continue an awaited run with the requested input.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#type ⇒ String
readonly
Resume type.
Class Method Summary collapse
-
.from_hash(hash) ⇒ AwaitResume?
Parse from hash, creating the appropriate subclass.
Methods inherited from Base
#==, attribute, attributes, #hash, #initialize, own_attributes, #to_h, #to_json
Constructor Details
This class inherits a constructor from SimpleAcp::Models::Base
Instance Attribute Details
#type ⇒ String (readonly)
Returns resume type.
73 |
# File 'lib/simple_acp/models/await.rb', line 73 attribute :type, required: true |
Class Method Details
.from_hash(hash) ⇒ AwaitResume?
Parse from hash, creating the appropriate subclass.
79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/simple_acp/models/await.rb', line 79 def self.from_hash(hash) return nil if hash.nil? type = hash["type"] || hash[:type] case type when "message" MessageAwaitResume.from_hash(hash) else super end end |