Module: Vault::Configurable
- Included in:
- Client
- Defined in:
- lib/vault/configurable.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#configure {|self| ... } ⇒ Object
Configure yields self for block-style configuration.
-
#options ⇒ Hash<Symbol, Object>
The list of options for this configurable.
Class Method Details
.keys ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/vault/configurable.rb', line 8 def self.keys @keys ||= [ :address, :token, :hostname, :namespace, :open_timeout, :proxy_address, :proxy_password, :proxy_port, :proxy_username, :pool_size, :pool_timeout, :read_timeout, :ssl_ciphers, :ssl_pem_contents, :ssl_pem_file, :ssl_pem_passphrase, :ssl_ca_cert, :ssl_ca_path, :ssl_cert_store, :ssl_verify, :ssl_timeout, :timeout, ] end |
Instance Method Details
#configure {|self| ... } ⇒ Object
Configure yields self for block-style configuration.
40 41 42 |
# File 'lib/vault/configurable.rb', line 40 def configure yield self end |
#options ⇒ Hash<Symbol, Object>
The list of options for this configurable.
47 48 49 50 51 |
# File 'lib/vault/configurable.rb', line 47 def Hash[*Vault::Configurable.keys.map do |key| [key, instance_variable_get(:"@#{key}")] end.flatten] end |