Sha256: b76e00ded2e59e9a1705a482bc5503778c9bba4ccfeafb29183c4712fb8b9ddd
Contents?: true
Size: 613 Bytes
Versions: 9
Compression:
Stored size: 613 Bytes
Contents
module ZTK class Command # Command Private Functionality module Private # Returns a string in the format of "user@hostname" for the current # shell. def tag @@hostname ||= Socket.gethostname.split('.').first.strip "#{ENV['USER']}@#{@@hostname}" end # Formats a header suitable for writing to the direct logger when logging # sessions. def log_header(what) count = 12 sep = ("=" * count) header = [sep, "[ #{what} ]", sep, "[ #{tag} ]", sep, "[ #{what} ]", sep].join "#{header}\n" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems