Class: ClaudeAgentSDK::McpHttpServerConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#[], #[]=, from_hash, wrap

Constructor Details

#initialize(attributes = {}) ⇒ McpHttpServerConfig

Returns a new instance of McpHttpServerConfig.



1304
1305
1306
1307
# File 'lib/claude_agent_sdk/types.rb', line 1304

def initialize(attributes = {})
  super
  @type = 'http'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type

Instance Attribute Details

#headersObject

Returns the value of attribute headers.



1301
1302
1303
# File 'lib/claude_agent_sdk/types.rb', line 1301

def headers
  @headers
end

#typeObject (readonly)

Returns the value of attribute type.



1302
1303
1304
# File 'lib/claude_agent_sdk/types.rb', line 1302

def type
  @type
end

#urlObject

Returns the value of attribute url.



1301
1302
1303
# File 'lib/claude_agent_sdk/types.rb', line 1301

def url
  @url
end

Instance Method Details

#to_hObject



1309
1310
1311
1312
1313
# File 'lib/claude_agent_sdk/types.rb', line 1309

def to_h
  result = { type: @type, url: @url }
  result[:headers] = @headers if @headers
  result
end