Class: Cadenya::Types::ToolSpec_Config_Mcp

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: nil, mcp: nil) ⇒ ToolSpec_Config_Mcp

Returns a new instance of ToolSpec_Config_Mcp.



8481
8482
8483
8484
# File 'lib/cadenya/types.rb', line 8481

def initialize(type: nil, mcp: nil)
  @type = type
  @mcp = mcp
end

Instance Attribute Details

#mcpObject (readonly)

Returns the value of attribute mcp.



8479
8480
8481
# File 'lib/cadenya/types.rb', line 8479

def mcp
  @mcp
end

#typeObject (readonly)

Returns the value of attribute type.



8479
8480
8481
# File 'lib/cadenya/types.rb', line 8479

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8486
8487
8488
8489
8490
8491
# File 'lib/cadenya/types.rb', line 8486

def self.from_json(data)
  new(
    type: data["type"],
    mcp: data["mcp"].nil? ? nil : Types::Config_MCP.from_json(data["mcp"]),
  )
end

Instance Method Details

#to_hObject



8493
8494
8495
8496
8497
8498
# File 'lib/cadenya/types.rb', line 8493

def to_h
  {
    type: Util.plain(@type),
    mcp: Util.plain(@mcp),
  }.reject { |_k, v| v.nil? }
end