Class: MuchKeys::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

sensible defaults



9
10
11
# File 'lib/muchkeys/configuration.rb', line 9

def initialize
  @consul_url = "http://localhost:8500"
end

Instance Attribute Details

#application_nameObject

Returns the value of attribute application_name.



6
7
8
# File 'lib/muchkeys/configuration.rb', line 6

def application_name
  @application_name
end

#consul_urlObject

Returns the value of attribute consul_url.



6
7
8
# File 'lib/muchkeys/configuration.rb', line 6

def consul_url
  @consul_url
end

#private_keyObject

Returns the value of attribute private_key.



6
7
8
# File 'lib/muchkeys/configuration.rb', line 6

def private_key
  @private_key
end

#public_keyObject

Returns the value of attribute public_key.



6
7
8
# File 'lib/muchkeys/configuration.rb', line 6

def public_key
  @public_key
end

#search_pathsObject

Returns the value of attribute search_paths.



6
7
8
# File 'lib/muchkeys/configuration.rb', line 6

def search_paths
  @search_paths
end

#secrets_hintObject

Returns the value of attribute secrets_hint.



6
7
8
# File 'lib/muchkeys/configuration.rb', line 6

def secrets_hint
  @secrets_hint
end

Instance Method Details

#attributesObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/muchkeys/configuration.rb', line 19

def attributes
  {
    consul_url:  @consul_url,
    private_key: @private_key,
    public_key:  @public_key,
    application_name: @application_name,
    search_paths: @search_paths,
    secrets_hint: @secrets_hint
  }.delete_if {|k,v| v.nil? }
end