Sha256: 178cac56ceaf16ac2714e7fee87b280c5e653ac145758ce6b73140740c2d0b98
Contents?: true
Size: 596 Bytes
Versions: 70
Compression:
Stored size: 596 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, char="=") count = 16 sep = (char * count) header = [sep, "[ #{tag} >>> #{what} ]", sep].join "#{header}\n" end end end end
Version data entries
70 entries across 70 versions & 1 rubygems