Sha256: abc08393d49b8e50c9f9d7219ea6d27292007a5483af034029924dda886d135f
Contents?: true
Size: 451 Bytes
Versions: 7
Compression:
Stored size: 451 Bytes
Contents
# frozen_string_literal: true module Runcom # A developer friendly wrapper of XDG cache. Cache = Struct.new :name, :home, :environment, keyword_init: true do def initialize *arguments super self[:home] ||= Runcom::Paths::Friendly self[:environment] ||= ENV freeze end def path paths.find(&:exist?) end def paths XDG::Cache.new(home: home, environment: environment).all end end end
Version data entries
7 entries across 7 versions & 1 rubygems