# frozen_string_literal: true require 'eac_ruby_utils/core_ext' module Avm module Sources class Base class SubsPaths SUBS_PATH_SEPARATOR = ':' common_constructor :source, :configuration_key, :default_paths # @return [String] def path paths.join(SUBS_PATH_SEPARATOR) end # @return [Array] def paths configured_paths || default_paths end # @return [Array] def configured_paths source.configuration.entry(configuration_key).value.if_present do |v| v.split(SUBS_PATH_SEPARATOR) end end end end end end