Class: Namabar::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/namabar/configuration.rb

Overview

Configuration class for storing Namabar API credentials and settings

This class holds the configuration options required to authenticate and interact with the Namabar API. It’s typically configured once globally and then used by all Client instances.

Examples:

Configure with API credentials

config = Namabar::Configuration.new
config.api_key = ENV.fetch('NAMABAR__API_KEY', nil)

Configure using the global configuration

Namabar.configure do |config|
  config.api_key = 'your-api-key'
end

See Also:

Instance Attribute Summary collapse

Instance Attribute Details

#api_keyString?

Returns the API key for authenticating with the Namabar API.

Examples:

Set API key

config.api_key = '1234567890abcdef'

Returns:

  • (String, nil)

    the API key for authenticating with the Namabar API



24
25
26
# File 'lib/namabar/configuration.rb', line 24

def api_key
  @api_key
end