]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/common/user_interface.rb
6a60d041b56a39465024b04add715de23d13df5a
[mailshears.git] / lib / common / user_interface.rb
1 def make_header(program_name, plugin_name)
2 # The header that we output before the list of domains/users.
3 # Just the path of this script, the current time, and the plugin name.
4 header = "#{program_name}, "
5
6 current_time = Time.now()
7 if current_time.respond_to?(:iso8601)
8 # Somehow this method is missing on some machines.
9 header += current_time.iso8601.to_s
10 else
11 # Fall back to whatever this looks like.
12 header += current_time.to_s
13 end
14
15 header += ' (Plugin: ' + plugin_name + ")\n"
16 header += '-' * header.size # Underline the header.
17
18 return header
19 end