Class: ModelContextProtocol::Server::Resource::DefinitionDSL

Inherits:
Object
  • Object
show all
Defined in:
lib/model_context_protocol/server/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defined_annotationsObject (readonly)

Returns the value of attribute defined_annotations.



87
88
89
# File 'lib/model_context_protocol/server/resource.rb', line 87

def defined_annotations
  @defined_annotations
end

Instance Method Details

#annotations(&block) ⇒ Object



114
115
116
117
118
# File 'lib/model_context_protocol/server/resource.rb', line 114

def annotations(&block)
  @defined_annotations = AnnotationsDSL.new
  @defined_annotations.instance_eval(&block)
  @defined_annotations
end

#description(value = nil) ⇒ Object



94
95
96
97
# File 'lib/model_context_protocol/server/resource.rb', line 94

def description(value = nil)
  @description = value if value
  @description
end

#mime_type(value = nil) ⇒ Object



104
105
106
107
# File 'lib/model_context_protocol/server/resource.rb', line 104

def mime_type(value = nil)
  @mime_type = value if value
  @mime_type
end

#name(value = nil) ⇒ Object



89
90
91
92
# File 'lib/model_context_protocol/server/resource.rb', line 89

def name(value = nil)
  @name = value if value
  @name
end

#title(value = nil) ⇒ Object



99
100
101
102
# File 'lib/model_context_protocol/server/resource.rb', line 99

def title(value = nil)
  @title = value if value
  @title
end

#uri(value = nil) ⇒ Object



109
110
111
112
# File 'lib/model_context_protocol/server/resource.rb', line 109

def uri(value = nil)
  @uri = value if value
  @uri
end