Sha256: 52e1b9a7d656699e6f35da2656a97a684c6267b1888e71e8241da4479ed1d747

Contents?: true

Size: 618 Bytes

Versions: 14

Compression:

Stored size: 618 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

14 entries across 14 versions & 1 rubygems

Version Path
xdg-7.0.3 lib/xdg/paths/combined.rb
xdg-7.0.2 lib/xdg/paths/combined.rb
xdg-7.0.1 lib/xdg/paths/combined.rb
xdg-7.0.0 lib/xdg/paths/combined.rb
xdg-6.6.2 lib/xdg/paths/combined.rb
xdg-6.6.1 lib/xdg/paths/combined.rb
xdg-6.6.0 lib/xdg/paths/combined.rb
xdg-6.5.0 lib/xdg/paths/combined.rb
xdg-6.4.0 lib/xdg/paths/combined.rb
xdg-6.3.3 lib/xdg/paths/combined.rb
xdg-6.3.2 lib/xdg/paths/combined.rb
xdg-6.3.1 lib/xdg/paths/combined.rb
xdg-6.3.0 lib/xdg/paths/combined.rb
xdg-6.2.0 lib/xdg/paths/combined.rb