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
avm-0.94.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.94.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.93.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.92.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.92.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.91.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.90.1 lib/avm/sources/base/subs_paths.rb
eac_tools-0.87.1 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.90.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.87.0 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.89.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.86.12 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.88.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.86.11 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.87.0 lib/avm/sources/base/subs_paths.rb
eac_tools-0.86.8 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.86.2 lib/avm/sources/base/subs_paths.rb
eac_tools-0.86.7 sub/avm/lib/avm/sources/base/subs_paths.rb
avm-0.86.1 lib/avm/sources/base/subs_paths.rb
eac_tools-0.86.5 sub/avm/lib/avm/sources/base/subs_paths.rb