Class: Cadenya::Types::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(annotations: nil) ⇒ Config_MCP

Returns a new instance of Config_MCP.



1309
1310
1311
# File 'lib/cadenya/types.rb', line 1309

def initialize(annotations: nil)
  @annotations = annotations
end

Instance Attribute Details

#annotationsObject (readonly)

Returns the value of attribute annotations.



1307
1308
1309
# File 'lib/cadenya/types.rb', line 1307

def annotations
  @annotations
end

Class Method Details

.from_json(data) ⇒ Object



1313
1314
1315
1316
1317
# File 'lib/cadenya/types.rb', line 1313

def self.from_json(data)
  new(
    annotations: data["annotations"].nil? ? nil : Types::MCP_Annotations.from_json(data["annotations"]),
  )
end

Instance Method Details

#to_hObject



1319
1320
1321
1322
1323
# File 'lib/cadenya/types.rb', line 1319

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