just redo all of it from scratch

This commit is contained in:
Joey Cardosi 2025-05-30 12:15:11 -04:00
commit d80b13736e
No known key found for this signature in database
GPG key ID: 5F93AEDDAAE66774
2 changed files with 33 additions and 26 deletions

View file

@ -1,45 +0,0 @@
# typed: strict
# frozen_string_literal: true
module MCP
class Resource
class Contents
attr_reader :uri, :mime_type
def initialize(uri:, mime_type: nil)
@uri = uri
@mime_type = mime_type
end
def to_h
{ uri:, mime_type: }.compact
end
end
class TextContents < Contents
attr_reader :text
def initialize(text:, uri:, mime_type:)
super(uri: uri, mime_type: mime_type)
@text = text
end
def to_h
super.merge(text: text)
end
end
class BlobContents < Contents
attr_reader :data
def initialize(data:, uri:, mime_type:)
super(uri: uri, mime_type: mime_type)
@data = data
end
def to_h
super.merge(data: data)
end
end
end
end

View file

@ -1,18 +0,0 @@
# typed: strict
# frozen_string_literal: true
module MCP
class Resource
class Embedded
attr_reader :resource, :annotations
def initialize(resource:, annotations: nil)
@annotations = annotations
end
def to_h
{ resource: resource.to_h, annotations: }.compact
end
end
end
end