lib/hako/env_providers/yaml.rb in hako-0.25.2 vs lib/hako/env_providers/yaml.rb in hako-0.26.0

- old
+ new

@@ -31,9 +31,26 @@ end end env end + # @return [Boolean] + def can_ask_keys? + true + end + + # @param [Array<String>] variables + # @return [Array<String>] + def ask_keys(variables) + keys = [] + read_from_yaml do |key, _| + if variables.include?(key) + keys << key + end + end + keys + end + private # @yieldparam [String] key # @yieldparam [String] val def read_from_yaml(&block)