Class: Precursor::Vault

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

Overview

Base class for config vaults

Direct Known Subclasses

ArgvVault, EnvVault, OverrideVault, YamlVault

Instance Method Summary collapse

Instance Method Details

#key?(key) ⇒ Boolean

Returns true if the vault has a value for the given key, otherwise false

Returns:

  • (Boolean)

    true if the vault has a value for the given key, otherwise false



8
9
10
# File 'lib/vault.rb', line 8

def key?(key)
  store.key?(key)
end

#value(key) ⇒ Object|Nil

Returns a value fot the given key, nil if key is not available

Returns:

  • (Object|Nil)

    a value for the given key



14
15
16
# File 'lib/vault.rb', line 14

def value(key)
  store[key]
end