Class: Psenv::Retriever

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Retriever

Returns a new instance of Retriever.



18
19
20
# File 'lib/psenv/retriever.rb', line 18

def initialize(path)
  @path = path
end

Class Method Details

.call(path) ⇒ Object



30
31
32
# File 'lib/psenv/retriever.rb', line 30

def self.call(path)
  new(path).call
end

Instance Method Details

#callObject



22
23
24
25
26
27
28
# File 'lib/psenv/retriever.rb', line 22

def call
  Hash[
    parameters.
      map { |parameter| Parameter.new(parameter) }.
      map { |parameter| [parameter.name, parameter.value] }
  ]
end