Class: ModelContextProtocol::Server::Pagination::PaginatedResponse
- Inherits:
-
Data
- Object
- Data
- ModelContextProtocol::Server::Pagination::PaginatedResponse
- Defined in:
- lib/model_context_protocol/server/pagination.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#next_cursor ⇒ Object
readonly
Returns the value of attribute next_cursor.
Instance Method Summary collapse
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items
12 13 14 |
# File 'lib/model_context_protocol/server/pagination.rb', line 12 def items @items end |
#next_cursor ⇒ Object (readonly)
Returns the value of attribute next_cursor
12 13 14 |
# File 'lib/model_context_protocol/server/pagination.rb', line 12 def next_cursor @next_cursor end |
Instance Method Details
#serialized(key) ⇒ Object
13 14 15 16 17 |
# File 'lib/model_context_protocol/server/pagination.rb', line 13 def serialized(key) result = {key => items} result[:nextCursor] = next_cursor if next_cursor result end |