class ThymePluginLabel
Public Class Methods
new(thyme, options={})
click to toggle source
# File lib/thyme_verbose/plugin_label.rb, line 3 def initialize(thyme, options={}) plugin_options = @plugin_options = {:label => ''} thyme.option :l, 'label str', 'Label' do |str| plugin_options[:label] = str @run = true end end
Public Instance Methods
after(seconds_left)
click to toggle source
# File lib/thyme_verbose/plugin_label.rb, line 17 def after(seconds_left) show_label end
before()
click to toggle source
Hooks
# File lib/thyme_verbose/plugin_label.rb, line 13 def before show_label end
Private Instance Methods
show_label()
click to toggle source
# File lib/thyme_verbose/plugin_label.rb, line 23 def show_label if !@plugin_options[:label].empty? caption = 'LABEL: ' + @plugin_options[:label] puts caption + ' ' * (50 - caption.length) end end