Class: Kagi::API::Configuration::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/kagi/api/configuration/loader.rb

Overview

Loads configuration based on environment or falls back to defaults.

Instance Method Summary collapse

Instance Method Details

#callObject



12
13
14
15
16
17
18
# File 'lib/kagi/api/configuration/loader.rb', line 12

def call
  model[
    content_type: environment.fetch("KAGI_API_CONTENT_TYPE", "application/json"),
    token: environment["KAGI_API_TOKEN"],
    uri: environment.fetch("KAGI_API_URI", "https://kagi.com/api/v0")
  ]
end