Methods

Included Modules

Test::Unit::Notify::NotifySend

Public Class Methods

new() click to toggle source
# File lib/test/unit/notify.rb, line 79
def initialize
  @command = "notify-send"
end

Public Instance Methods

run(parameters) click to toggle source
# File lib/test/unit/notify.rb, line 83
def run(parameters)
  expire_time = parameters[:expire_time] * 1000
  urgency = parameters[:urgency]
  title = parameters[:title]
  message = h(parameters[:message])
  icon = parameters[:icon]

  command_line = [@command,
                  "--expire-time", expire_time.to_s,
                  "--urgency", urgency]
  command_line.concat(["--icon", icon.to_s]) if icon
  command_line << title
  command_line << message
  system(*command_line)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.