Sha256: ddaf1444264367320b60ae0ba4ce35ea1e960c2ecb6dd200bd08ff5168dfbadc
Contents?: true
Size: 374 Bytes
Versions: 13
Compression:
Stored size: 374 Bytes
Contents
# frozen_string_literal: true module XDG PAIR_DELIMITER = "=" # A generic key-value pair (KVP). Pair = Struct.new :key, :value do def to_env = Hash[*values] def key? = key.to_s.size.positive? def value? = value.to_s.size.positive? def empty? = !(key? && value?) def inspect = key? || value? ? "#{key}#{PAIR_DELIMITER}#{value}" : "" end end
Version data entries
13 entries across 13 versions & 1 rubygems