Class: CloudParty::Simple

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_party/simple.rb

Instance Method Summary collapse

Constructor Details

#initializeSimple

Returns a new instance of Simple.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cloud_party/simple.rb', line 6

def initialize
  cp_config = AppConfiguration.new('config') do
    base_local_path Pathname.new(Dir.home).join('.cloud_party/')
    base_global_path Pathname.new(Etc.sysconfdir).join('cloud_party')
    use_env_variables true
    prefix 'cloud_party'
  end
  cfcli_config = AppConfiguration.new('config') do
    base_local_path Pathname.new(Dir.home).join('.cfcli/')
    base_global_path Pathname.new(Etc.sysconfdir).join('cloudflare_cli')
    use_env_variables true
    prefix 'cf_cli'
  end
  @email = cp_config.email || cfcli_config.email
  @api_key = cp_config.api_key || cfcli_config.api_key
end

Instance Method Details

#api_keyString

Returns the api key string.

Returns:

  • (String)

    the api key string



29
30
31
# File 'lib/cloud_party/simple.rb', line 29

def api_key
  @api_key
end

#emailString

Returns the email string.

Returns:

  • (String)

    the email string



24
25
26
# File 'lib/cloud_party/simple.rb', line 24

def email
  @email
end