Class: Automatic1111::Client

Inherits:
Object
  • Object
show all
Includes:
Configurable, Connection
Defined in:
lib/automatic1111/client.rb

Instance Attribute Summary

Attributes included from Configurable

#api_endpoint_url, #cookie, #read_timeout

Instance Method Summary collapse

Methods included from Connection

#delete, #get, #head, #last_response, #patch, #post, #put

Methods included from Configurable

#configure, keys

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



11
12
13
14
15
16
17
# File 'lib/automatic1111/client.rb', line 11

def initialize(options = {})
  # Use options passed in, but fall back to module defaults
  Automatic1111::Configurable.keys.each do |key|
    value = options.key?(key) ? options[key] : Automatic1111.instance_variable_get(:"@#{key}")
    instance_variable_set(:"@#{key}", value)
  end
end