Method: Experiment::Notify.completed

Defined in:
lib/experiment/notify.rb

.completed(experiment, msg = "") ⇒ Object

Called when experiment completed. Shows a Growl notification on OSX. The message can be expanded by overriding the result_line method in the experiment class



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/experiment/notify.rb', line 42

def completed(experiment, msg = "")
  if @growl
    begin
      `G_TITLE="Experiment Complete" #{File.dirname(__FILE__)}/../../bin/growl.sh -nosticky "Experimental condition #{experiment} complete. #{msg}"`
    rescue
      # probably not on OSX
    end
  end
  m = "Condition #{experiment} complete. #{msg}"
  puts m + " " * @terminal_width
  @curent_experiment = nil
end