Class: Hako::EnvProviders::Env

Inherits:
EnvProvider
  • Object
show all
Defined in:
lib/hako/env_providers/env.rb

Instance Method Summary collapse

Constructor Details

#initialize(_root_path, _options) ⇒ Env

Returns a new instance of Env.



8
9
# File 'lib/hako/env_providers/env.rb', line 8

def initialize(_root_path, _options)
end

Instance Method Details

#ask(variables) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/hako/env_providers/env.rb', line 11

def ask(variables)
  env = {}
  variables.each do |key|
    env[key] = ENV[key]
  end
  env
end

#ask_keys(variables) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/hako/env_providers/env.rb', line 23

def ask_keys(variables)
  keys = []
  variables.each do |key, _|
    keys << ENV.has_key?(key)
  end
  keys
end

#can_ask_keys?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/hako/env_providers/env.rb', line 19

def can_ask_keys?
  true
end