Class: MockServer::LLM::IsolationSource
- Inherits:
-
Object
- Object
- MockServer::LLM::IsolationSource
- Defined in:
- lib/mockserver/llm.rb
Overview
IsolationSource — encodes as “kind:name” (e.g. “header:x-session-id”)
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #encode ⇒ String
-
#initialize(kind, name) ⇒ IsolationSource
constructor
A new instance of IsolationSource.
Constructor Details
#initialize(kind, name) ⇒ IsolationSource
Returns a new instance of IsolationSource.
387 388 389 390 391 392 |
# File 'lib/mockserver/llm.rb', line 387 def initialize(kind, name) raise ArgumentError, 'name must not be nil or empty' if name.nil? || name.to_s.empty? @kind = kind @name = name end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
385 386 387 |
# File 'lib/mockserver/llm.rb', line 385 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
385 386 387 |
# File 'lib/mockserver/llm.rb', line 385 def name @name end |
Instance Method Details
#encode ⇒ String
395 396 397 |
# File 'lib/mockserver/llm.rb', line 395 def encode "#{@kind}:#{@name}" end |