Class: RubyLLM::MCP::Extensions::Apps::ResourceMetadata
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Extensions::Apps::ResourceMetadata
- Defined in:
- lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb
Instance Attribute Summary collapse
-
#csp ⇒ Object
readonly
Returns the value of attribute csp.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#prefers_border ⇒ Object
readonly
Returns the value of attribute prefers_border.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(raw) ⇒ ResourceMetadata
constructor
A new instance of ResourceMetadata.
Constructor Details
#initialize(raw) ⇒ ResourceMetadata
Returns a new instance of ResourceMetadata.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb', line 10 def initialize(raw) @raw = raw.is_a?(Hash) ? raw : {} = @raw[Constants::UI_KEY] @csp = &.dig(Constants::CSP_KEY) @permissions = &.dig(Constants::PERMISSIONS_KEY) @domain = &.dig(Constants::DOMAIN_KEY) @prefers_border = &.dig(Constants::PREFERS_BORDER_KEY) @prefers_border = &.dig(Constants::PREFERS_BORDER_ALT_KEY) if @prefers_border.nil? end |
Instance Attribute Details
#csp ⇒ Object (readonly)
Returns the value of attribute csp.
8 9 10 |
# File 'lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb', line 8 def csp @csp end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
8 9 10 |
# File 'lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb', line 8 def domain @domain end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
8 9 10 |
# File 'lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb', line 8 def @permissions end |
#prefers_border ⇒ Object (readonly)
Returns the value of attribute prefers_border.
8 9 10 |
# File 'lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb', line 8 def prefers_border @prefers_border end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
8 9 10 |
# File 'lib/ruby_llm/mcp/extensions/apps/resource_metadata.rb', line 8 def raw @raw end |