Sha256: 8adb90ac922c980e141e399314c0c13c3def4746309573e874229d1a00c49e16
Contents?: true
Size: 629 Bytes
Versions: 11
Compression:
Stored size: 629 Bytes
Contents
# frozen_string_literal: true require "forwardable" require "xdg/pair" module XDG # Provides state support. class State extend Forwardable HOME_PAIR = Pair["XDG_STATE_HOME", ".local/state"].freeze delegate %i[home directories all to_s to_str] => :combined def initialize home: Paths::Home, directories: Paths::Directory, environment: ENV @combined = Paths::Combined.new home.new(HOME_PAIR, environment), directories.new(Pair.new, environment) end def inspect = "#<#{self.class}:#{object_id} #{self}>" private attr_reader :combined end end
Version data entries
11 entries across 11 versions & 1 rubygems