Sha256: cade20cc074fe8fdfa72d4ccfd9a97d134d158a7521135aefcb45fe1149d1a4f

Contents?: true

Size: 675 Bytes

Versions: 29

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/filesystem_cache'
require 'eac_ruby_utils/simple_cache'

module Ehbrs
  module UserDirs
    class << self
      include ::EacRubyUtils::SimpleCache

      def application_id
        'ehbrs-tools'
      end

      private

      def user_home_dir_uncached
        ::EacRubyUtils::FilesystemCache.new(ENV['HOME'])
      end

      def cache_uncached
        user_home_dir.child('.cache', application_id)
      end

      def config_uncached
        user_home_dir.child('.config', application_id)
      end

      def data_uncached
        user_home_dir.child('.local', 'share', application_id)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ehbrs-tools-0.27.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.26.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.25.1 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.25.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.24.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.23.1 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.23.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.22.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.21.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.20.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.19.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.18.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.17.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.16.5 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.16.4 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.16.3 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.16.2 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.16.1 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.16.0 lib/ehbrs/user_dirs.rb
ehbrs-tools-0.15.0 lib/ehbrs/user_dirs.rb