Class: ModelContextProtocol::Server::Completion

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argument_name, argument_value) ⇒ Completion

Returns a new instance of Completion.



5
6
7
8
# File 'lib/model_context_protocol/server/completion.rb', line 5

def initialize(argument_name, argument_value)
  @argument_name = argument_name
  @argument_value = argument_value
end

Instance Attribute Details

#argument_nameObject (readonly)

Returns the value of attribute argument_name.



3
4
5
# File 'lib/model_context_protocol/server/completion.rb', line 3

def argument_name
  @argument_name
end

#argument_valueObject (readonly)

Returns the value of attribute argument_value.



3
4
5
# File 'lib/model_context_protocol/server/completion.rb', line 3

def argument_value
  @argument_value
end

Class Method Details

.callObject



14
15
16
# File 'lib/model_context_protocol/server/completion.rb', line 14

def self.call(...)
  new(...).call
end

.define(&block) ⇒ Object



18
19
20
21
22
# File 'lib/model_context_protocol/server/completion.rb', line 18

def self.define(&block)
  Class.new(self) do
    define_method(:call, &block)
  end
end

Instance Method Details

#callObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/model_context_protocol/server/completion.rb', line 10

def call
  raise NotImplementedError, "Subclasses must implement the call method"
end