Class: NeverBounce::CLI::UserConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/never_bounce/cli/user_config.rb,
lib/never_bounce/cli/user_config/file_content.rb

Overview

User's configuration values.

See Also:

Defined Under Namespace

Classes: FileContent

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyString

API key.

Returns:

  • (String)

17
18
19
# File 'lib/never_bounce/cli/user_config.rb', line 17

def api_key
  @api_key ||= fc[:api_key]
end

#api_urlString

API URL.

Returns:

  • (String)

23
24
25
# File 'lib/never_bounce/cli/user_config.rb', line 23

def api_url
  @api_url ||= fc[:api_url]
end

#fcFileContent

Returns:


31
32
33
# File 'lib/never_bounce/cli/user_config.rb', line 31

def fc
  _cache[:fc] ||= FileContent.new
end

Instance Method Details

#touchself

“Touch” all attributes by loading them.

Returns:

  • (self)

41
42
43
44
# File 'lib/never_bounce/cli/user_config.rb', line 41

def touch
  api_key; api_url
  self
end