Sha256: b2b75cbac6ec411c88cb263f90d922602efee2269158ee170b54701b827a2618

Contents?: true

Size: 594 Bytes

Versions: 24

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module XDG
  class Data
    extend Forwardable

    HOME_PAIR = Pair["XDG_DATA_HOME", ".local/share"].freeze
    DIRS_PAIR = Pair["XDG_DATA_DIRS", "/usr/local/share:/usr/share"].freeze

    delegate %i[home directories all inspect] => :combined

    def initialize home: Paths::Home, directories: Paths::Directory, environment: ENV
      @combined = Paths::Combined.new home.new(HOME_PAIR, environment),
                                      directories.new(DIRS_PAIR, environment)
    end

    private

    attr_reader :combined
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
xdg-6.5.0 lib/xdg/data.rb
xdg-6.4.0 lib/xdg/data.rb
xdg-6.3.3 lib/xdg/data.rb
xdg-6.3.2 lib/xdg/data.rb
xdg-6.3.1 lib/xdg/data.rb
xdg-6.3.0 lib/xdg/data.rb
xdg-6.2.0 lib/xdg/data.rb
xdg-6.1.0 lib/xdg/data.rb
xdg-6.0.1 lib/xdg/data.rb
xdg-6.0.0 lib/xdg/data.rb
xdg-5.3.0 lib/xdg/data.rb
xdg-5.2.0 lib/xdg/data.rb
xdg-5.1.3 lib/xdg/data.rb
xdg-5.1.2 lib/xdg/data.rb
xdg-5.1.1 lib/xdg/data.rb
xdg-5.1.0 lib/xdg/data.rb
xdg-5.0.0 lib/xdg/data.rb
xdg-4.5.0 lib/xdg/data.rb
xdg-4.4.0 lib/xdg/data.rb
xdg-4.3.0 lib/xdg/data.rb