Files

Guard::Notifier::TerminalTitle

Public Instance Methods

available?(silent = false, options = {}) click to toggle source

Test if the notification library is available.

@param [Boolean] silent true if no error messages should be shown @param [Hash] options notifier options @return [Boolean] the availability status

# File lib/guard/notifiers/terminal_title.rb, line 13
def available?(silent = false, options = {})
  true
end
notify(type, title, message, image, options = { }) click to toggle source

Show a system notification.

@param [String] type the notification type. Either 'success', 'pending', 'failed' or 'notify' @param [String] title the notification title @param [String] message the notification message body @param [String] image the path to the notification image @param [Hash] options additional notification library options

# File lib/guard/notifiers/terminal_title.rb, line 25
def notify(type, title, message, image, options = { })
  first_line = message.sub(/^\n/, '').sub(/\n.*/, '')
  puts("\e]2;[#{ title }] #{ first_line }\a")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.