just redo all of it from scratch
This commit is contained in:
parent
0b49c3f711
commit
d80b13736e
1 changed files with 33 additions and 26 deletions
24
lib/mcp/shared/resource.rb
Normal file
24
lib/mcp/shared/resource.rb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MCP
|
||||
class Resource
|
||||
attr_reader :uri, :name, :description, :mime_type
|
||||
|
||||
def initialize(uri:, name:, description:, mime_type:)
|
||||
@uri = uri
|
||||
@name = name
|
||||
@description = description
|
||||
@mime_type = mime_type
|
||||
end
|
||||
|
||||
def to_h
|
||||
{
|
||||
uri: @uri,
|
||||
name: @name,
|
||||
description: @description,
|
||||
mimeType: @mime_type,
|
||||
}.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue