Sha256: ab1f244c88b581f88fbd838c701973cfbe72aa1592d93fd63418896a26fe15dd
Contents?: true
Size: 1023 Bytes
Versions: 5
Compression:
Stored size: 1023 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' require 'eac_ruby_utils/yaml' require 'shellwords' module Avm module Sources class Base module Configuration # @return [Array<String>, nil] def read_configuration_as_shell_words(key) configuration[key].if_present do |v| v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v.to_s) end end private # @return [Hash] def configuration_uncached ::Avm::Sources::Configuration::FILENAMES.each do |filename| file_path = path.join(filename) return ::EacRubyUtils::Yaml.load_file(file_path).with_indifferent_access if file_path.exist? end {} end # @return [Avm::Sources::Configuration] def old_configuration_uncached ::Avm::Sources::Configuration.find_in_path(path) || ::Avm::Sources::Configuration.temp_instance end end end end end
Version data entries
5 entries across 5 versions & 2 rubygems