Fix Resource::Embedded not setting @resource in initialize
The `initialize` method was missing the assignment of `@resource`, causing the resource method to always return `nil` and `to_h` to return an incorrect hash with an empty resource value. Added comprehensive tests to verify the fix and prevent regression.
This commit is contained in:
parent
3addc525df
commit
05c0119e53
1 changed files with 108 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ module MCP
|
|||
attr_reader :resource, :annotations
|
||||
|
||||
def initialize(resource:, annotations: nil)
|
||||
@resource = resource
|
||||
@annotations = annotations
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue