Permalink
Browse files

Update YARD documentation

  • Loading branch information...
1 parent 6380596 commit 49da217d81db80778336d982b1c751c2929695c6 @matthijsgroen matthijsgroen committed Oct 4, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 lib/guard/notifiers/tmux.rb
View
12 lib/guard/notifiers/tmux.rb
@@ -3,7 +3,8 @@ module Notifier
# Default options for Tmux
- # Changes the color of the Tmux status bar
+ # Changes the color of the Tmux status bar, and optionally
+ # shows messages in the status bar. (see display_message)
#
# @example Add the `:tmux` notifier to your `Guardfile`
# notification :tmux
@@ -56,6 +57,15 @@ def notify(type, title, message, image, options = { })
display_message(type, title, message, options) if show_message
end
+ # Display a message in the statusbar of tmux.
+ #
+ # @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 [Hash] options additional notification library options
+ # @option options [Integer] timeout the amount of seconds to show the message in the statusbar (default is 5)
+ # @option options [String] message_format a string to use as formatter. (default is '%s - %s')
+ # @option options [String] line_separator a string to use instead of a line-break. (default is ' - ')
def display_message(type, title, message, options = { })
message_format = options[:message_format] || DEFAULTS[:message_format]
display_time = options[:timeout] || DEFAULTS[:timeout]

0 comments on commit 49da217

Please sign in to comment.