Sha256: fb3bc8aee87df94155722fd8897f65a21755d971a2d102b35170dff20e960cc0

Contents?: true

Size: 617 Bytes

Versions: 4

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

require "pathname"

module XDG
  module Paths
    # The combined home and directory paths.
    class Combined
      def initialize initial_home, initial_directories
        @initial_home = initial_home
        @initial_directories = initial_directories
      end

      def home = initial_home.dynamic

      def directories = initial_directories.dynamic

      def all = directories.prepend(*home)

      def inspect = [initial_home.inspect, initial_directories.inspect].reject(&:empty?).join " "

      private

      attr_reader :initial_home, :initial_directories
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
xdg-7.1.3 lib/xdg/paths/combined.rb
xdg-7.1.2 lib/xdg/paths/combined.rb
xdg-7.1.1 lib/xdg/paths/combined.rb
xdg-7.1.0 lib/xdg/paths/combined.rb