Class: Dry::Credentials::YAML::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/credentials/yaml.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Query

Returns a new instance of Query.

Parameters:

  • hash (Hash)

    hash of hashes containing the credentials



27
28
29
30
# File 'lib/dry/credentials/yaml.rb', line 27

def initialize(hash)
  @hash = hash
  inject_into self
end

Instance Method Details

#to_hHash

Get all credentials below the current node as a hash.

Returns:

  • (Hash)

    credentials



35
36
37
# File 'lib/dry/credentials/yaml.rb', line 35

def to_h
  @hash
end