Class: Test::Unit::Notify::NotifySend

### Home Classes Methods

### In Files

- lib/test/unit/notify.rb

### Parent

Test::Unit::Notify::NotifyCommand

### Methods

- ::new
- #run

### Included Modules

- ERB::Util

### Class/Module Index

Quicksearch

- Test
- Test::Unit
- Test::Unit::Notify
- Test::Unit::Notify::Growlnotify
- Test::Unit::Notify::Notifier
- Test::Unit::Notify::NotifyCommand
- Test::Unit::Notify::NotifySend

No matching classes.

# Test::Unit::Notify::NotifySend

@private

### Public Class Methods

new() click to toggle source

    # File lib/test/unit/notify.rb, line 104
    def initialize
      @command = "notify-send"
    end

### Public Instance Methods

run(parameters) click to toggle source

    # File lib/test/unit/notify.rb, line 108
    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,
                      "--app-name", title,
                      "--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.