Class: ClaudeAgentSDK::SdkPluginConfig

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

Overview

SDK Plugin configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, type: 'local') ⇒ SdkPluginConfig

Returns a new instance of SdkPluginConfig.

Raises:

  • (ArgumentError)


1602
1603
1604
1605
1606
1607
# File 'lib/claude_agent_sdk/types.rb', line 1602

def initialize(path:, type: 'local')
  raise ArgumentError, "unsupported plugin type: #{type}" unless %w[local plugin].include?(type)

  @type = 'local'
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



1600
1601
1602
# File 'lib/claude_agent_sdk/types.rb', line 1600

def path
  @path
end

#typeObject

Returns the value of attribute type.



1600
1601
1602
# File 'lib/claude_agent_sdk/types.rb', line 1600

def type
  @type
end

Instance Method Details

#to_hObject



1609
1610
1611
# File 'lib/claude_agent_sdk/types.rb', line 1609

def to_h
  { type: @type, path: @path }
end