Class: ModelContextProtocol::Server::Resource::DefinitionDSL
- Inherits:
-
Object
- Object
- ModelContextProtocol::Server::Resource::DefinitionDSL
- Defined in:
- lib/model_context_protocol/server/resource.rb
Instance Attribute Summary collapse
-
#defined_annotations ⇒ Object
readonly
Returns the value of attribute defined_annotations.
Instance Method Summary collapse
- #annotations(&block) ⇒ Object
- #description(value = nil) ⇒ Object
- #mime_type(value = nil) ⇒ Object
- #name(value = nil) ⇒ Object
- #title(value = nil) ⇒ Object
- #uri(value = nil) ⇒ Object
Instance Attribute Details
#defined_annotations ⇒ Object (readonly)
Returns the value of attribute defined_annotations.
90 91 92 |
# File 'lib/model_context_protocol/server/resource.rb', line 90 def defined_annotations @defined_annotations end |
Instance Method Details
#annotations(&block) ⇒ Object
117 118 119 120 121 |
# File 'lib/model_context_protocol/server/resource.rb', line 117 def annotations(&block) @defined_annotations = AnnotationsDSL.new @defined_annotations.instance_eval(&block) @defined_annotations end |
#description(value = nil) ⇒ Object
97 98 99 100 |
# File 'lib/model_context_protocol/server/resource.rb', line 97 def description(value = nil) @description = value if value @description end |
#mime_type(value = nil) ⇒ Object
107 108 109 110 |
# File 'lib/model_context_protocol/server/resource.rb', line 107 def mime_type(value = nil) @mime_type = value if value @mime_type end |
#name(value = nil) ⇒ Object
92 93 94 95 |
# File 'lib/model_context_protocol/server/resource.rb', line 92 def name(value = nil) @name = value if value @name end |
#title(value = nil) ⇒ Object
102 103 104 105 |
# File 'lib/model_context_protocol/server/resource.rb', line 102 def title(value = nil) @title = value if value @title end |
#uri(value = nil) ⇒ Object
112 113 114 115 |
# File 'lib/model_context_protocol/server/resource.rb', line 112 def uri(value = nil) @uri = value if value @uri end |