Module: Replicate::Configurable

Included in:
Replicate, Client
Defined in:
lib/replicate/configurable.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_endpoint_urlObject

API endpoint methods



22
23
24
# File 'lib/replicate/configurable.rb', line 22

def api_endpoint_url
  @api_endpoint_url ||= "https://api.replicate.com/v1"
end

#api_tokenObject

Returns the value of attribute api_token.



5
6
7
# File 'lib/replicate/configurable.rb', line 5

def api_token
  @api_token
end

#dreambooth_endpoint_urlObject



26
27
28
# File 'lib/replicate/configurable.rb', line 26

def dreambooth_endpoint_url
  @dreambooth_endpoint_url ||= "https://dreambooth-api-experimental.replicate.com/v1"
end

#webhook_urlObject

Returns the value of attribute webhook_url.



5
6
7
# File 'lib/replicate/configurable.rb', line 5

def webhook_url
  @webhook_url
end

Class Method Details

.keysArray

List of configurable keys for Datatrans::Client

Returns:

  • (Array)

    of option keys



11
12
13
# File 'lib/replicate/configurable.rb', line 11

def keys
  @keys ||= %i[api_token api_endpoint_url dreambooth_endpoint_url webhook_url]
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Set configuration options using a block

Yields:

  • (_self)

Yield Parameters:



17
18
19
# File 'lib/replicate/configurable.rb', line 17

def configure
  yield self
end