Sha256: 0000aa53a9f638af4af9cbcdf0177ba154ce9d84079e5b7bebe0ae297151e668

Contents?: true

Size: 684 Bytes

Versions: 212

Compression:

Stored size: 684 Bytes

Contents

# 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<String>]
        def paths
          configured_paths || default_paths
        end

        # @return [Array<String>]
        def configured_paths
          source.configuration_entry(configuration_key).value.if_present do |v|
            v.split(SUBS_PATH_SEPARATOR)
          end
        end
      end
    end
  end
end

Version data entries

212 entries across 212 versions & 2 rubygems

Version Path
eac_tools-0.62.0 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.61.1 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.61.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.67.1 lib/avm/sources/base/subs_paths.rb
eac_tools-0.60.3 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.60.2 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.67.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.60.1 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.60.0 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.59.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.66.1 lib/avm/sources/base/subs_paths.rb
eac_tools-0.58.0 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.57.0 sub/avm/lib/avm/sources/base/subs_paths.rb
eac_tools-0.56.1 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.66.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.56.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.65.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.55.7 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.64.2 lib/avm/sources/base/subs_paths.rb
eac_tools-0.55.6 sub/avm/lib/avm/sources/base/subs_paths.rb