Class: ClaudeAgentSDK::UnknownBlock

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Generic content block for types the SDK doesn’t explicitly handle (e.g., “document”, “image”). Preserves the raw hash data for forward compatibility with newer CLI versions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, data:) ⇒ UnknownBlock

Returns a new instance of UnknownBlock.



108
109
110
111
# File 'lib/claude_agent_sdk/types.rb', line 108

def initialize(type:, data:)
  @type = type
  @data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



106
107
108
# File 'lib/claude_agent_sdk/types.rb', line 106

def data
  @data
end

#typeObject

Returns the value of attribute type.



106
107
108
# File 'lib/claude_agent_sdk/types.rb', line 106

def type
  @type
end