]>
gitweb.michael.orlitzky.com - mailshears.git/blob - 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}, "
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
11 # Fall back to whatever this looks like.
12 header +
= current_time
.to_s
15 header +
= ' (Plugin: ' + plugin_name +
")\n"
16 header +
= '-' * header
.size
# Underline the header.