Class: Cadenya::Types::ToolSetAdapter_McpVariant

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) ⇒ ToolSetAdapter_McpVariant

Returns a new instance of ToolSetAdapter_McpVariant.



7947
7948
7949
7950
# File 'lib/cadenya/types.rb', line 7947

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

Instance Attribute Details

#mcpObject (readonly)

Returns the value of attribute mcp.



7945
7946
7947
# File 'lib/cadenya/types.rb', line 7945

def mcp
  @mcp
end

#typeObject (readonly)

Returns the value of attribute type.



7945
7946
7947
# File 'lib/cadenya/types.rb', line 7945

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



7952
7953
7954
7955
7956
7957
# File 'lib/cadenya/types.rb', line 7952

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

Instance Method Details

#to_hObject



7959
7960
7961
7962
7963
7964
# File 'lib/cadenya/types.rb', line 7959

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