Merge pull request #224 from koic/extract_annotations_from_mcp
Extract `MCP::Annotations` into a dedicated file
This commit is contained in:
commit
c11393f4c4
1 changed files with 81 additions and 9 deletions
21
lib/mcp/annotations.rb
Normal file
21
lib/mcp/annotations.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module MCP
|
||||
class Annotations
|
||||
attr_reader :audience, :priority, :last_modified
|
||||
|
||||
def initialize(audience: nil, priority: nil, last_modified: nil)
|
||||
@audience = audience
|
||||
@priority = priority
|
||||
@last_modified = last_modified
|
||||
end
|
||||
|
||||
def to_h
|
||||
{
|
||||
audience: audience,
|
||||
priority: priority,
|
||||
lastModified: last_modified,
|
||||
}.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue