Class: Llmclt::Http::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/llmclt/http/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ Connection

Returns a new instance of Connection.



8
9
10
11
12
# File 'lib/llmclt/http/connection.rb', line 8

def initialize(**kwargs)
  @name = kwargs[:name]
  @http = kwargs[:http]
  @last_use = kwargs[:last_use]
end

Instance Attribute Details

#httpObject

Returns the value of attribute http.



6
7
8
# File 'lib/llmclt/http/connection.rb', line 6

def http
  @http
end

#last_useObject

Returns the value of attribute last_use.



6
7
8
# File 'lib/llmclt/http/connection.rb', line 6

def last_use
  @last_use
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/llmclt/http/connection.rb', line 6

def name
  @name
end

Instance Method Details

#finishObject



14
15
16
# File 'lib/llmclt/http/connection.rb', line 14

def finish
  http.finish if http&.started?
end