Class: MCP::Annotations

Inherits:
Object
  • Object
show all
Defined in:
lib/mcp/annotations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(audience: nil, priority: nil, last_modified: nil) ⇒ Annotations

Returns a new instance of Annotations.



7
8
9
10
11
# File 'lib/mcp/annotations.rb', line 7

def initialize(audience: nil, priority: nil, last_modified: nil)
  @audience = audience
  @priority = priority
  @last_modified = last_modified
end

Instance Attribute Details

#audienceObject (readonly)

Returns the value of attribute audience.



5
6
7
# File 'lib/mcp/annotations.rb', line 5

def audience
  @audience
end

#last_modifiedObject (readonly)

Returns the value of attribute last_modified.



5
6
7
# File 'lib/mcp/annotations.rb', line 5

def last_modified
  @last_modified
end

#priorityObject (readonly)

Returns the value of attribute priority.



5
6
7
# File 'lib/mcp/annotations.rb', line 5

def priority
  @priority
end

Instance Method Details

#to_hObject



13
14
15
16
17
18
19
# File 'lib/mcp/annotations.rb', line 13

def to_h
  {
    audience: audience,
    priority: priority,
    lastModified: last_modified,
  }.compact
end