Sha256: 4c6373e1ee52d037bee39d0464b86b8343d4b127431002836913e5be27a2bb70
Contents?: true
Size: 451 Bytes
Versions: 11
Compression:
Stored size: 451 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] end def key? key.to_s.size.positive? end def value? value.to_s.size.positive? end def empty? !(key? && value?) end def inspect return "" unless key? || value? "#{key}#{PAIR_DELIMITER}#{value}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems