Class: ClaudeAgentSDK::McpStdioServerConfig
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::McpStdioServerConfig
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
MCP Server configurations
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#command ⇒ Object
Returns the value of attribute command.
-
#env ⇒ Object
Returns the value of attribute env.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(command:, args: nil, env: nil, type: 'stdio') ⇒ McpStdioServerConfig
constructor
A new instance of McpStdioServerConfig.
- #to_h ⇒ Object
Constructor Details
#initialize(command:, args: nil, env: nil, type: 'stdio') ⇒ McpStdioServerConfig
Returns a new instance of McpStdioServerConfig.
1516 1517 1518 1519 1520 1521 |
# File 'lib/claude_agent_sdk/types.rb', line 1516 def initialize(command:, args: nil, env: nil, type: 'stdio') @type = type @command = command @args = args @env = env end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
1514 1515 1516 |
# File 'lib/claude_agent_sdk/types.rb', line 1514 def args @args end |
#command ⇒ Object
Returns the value of attribute command.
1514 1515 1516 |
# File 'lib/claude_agent_sdk/types.rb', line 1514 def command @command end |
#env ⇒ Object
Returns the value of attribute env.
1514 1515 1516 |
# File 'lib/claude_agent_sdk/types.rb', line 1514 def env @env end |
#type ⇒ Object
Returns the value of attribute type.
1514 1515 1516 |
# File 'lib/claude_agent_sdk/types.rb', line 1514 def type @type end |
Instance Method Details
#to_h ⇒ Object
1523 1524 1525 1526 1527 1528 |
# File 'lib/claude_agent_sdk/types.rb', line 1523 def to_h result = { type: @type, command: @command } result[:args] = @args if @args result[:env] = @env if @env result end |