Class: Backup::Notifier::Hipchat
- Defined in:
- lib/backup/notifier/hipchat.rb
Instance Attribute Summary collapse
-
#failure_color ⇒ Object
The background color of an error message.
-
#from ⇒ Object
Who the notification should appear from.
-
#notify_users ⇒ Object
Notify users in the room.
-
#rooms_notified ⇒ Object
The rooms that should be notified.
-
#success_color ⇒ Object
The background color of a success message.
-
#token ⇒ Object
The Hipchat API token.
-
#warning_color ⇒ Object
The background color of a warning message.
Attributes inherited from Base
#on_failure, #on_success, #on_warning
Instance Method Summary collapse
-
#initialize(model, &block) ⇒ Hipchat
constructor
A new instance of Hipchat.
Methods inherited from Base
Methods included from Configuration::Helpers
#clear_defaults!, #load_defaults!
Constructor Details
#initialize(model, &block) ⇒ Hipchat
Returns a new instance of Hipchat.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/backup/notifier/hipchat.rb', line 47 def initialize(model, &block) super(model) @notify_users ||= false @rooms_notified ||= [] @success_color ||= 'yellow' @warning_color ||= 'yellow' @failure_color ||= 'yellow' instance_eval(&block) if block_given? end |
Instance Attribute Details
#failure_color ⇒ Object
The background color of an error message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
45 46 47 |
# File 'lib/backup/notifier/hipchat.rb', line 45 def failure_color @failure_color end |
#from ⇒ Object
Who the notification should appear from
22 23 24 |
# File 'lib/backup/notifier/hipchat.rb', line 22 def from @from end |
#notify_users ⇒ Object
Notify users in the room
30 31 32 |
# File 'lib/backup/notifier/hipchat.rb', line 30 def notify_users @notify_users end |
#rooms_notified ⇒ Object
The rooms that should be notified
26 27 28 |
# File 'lib/backup/notifier/hipchat.rb', line 26 def rooms_notified @rooms_notified end |
#success_color ⇒ Object
The background color of a success message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
35 36 37 |
# File 'lib/backup/notifier/hipchat.rb', line 35 def success_color @success_color end |
#token ⇒ Object
The Hipchat API token
18 19 20 |
# File 'lib/backup/notifier/hipchat.rb', line 18 def token @token end |
#warning_color ⇒ Object
The background color of a warning message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
40 41 42 |
# File 'lib/backup/notifier/hipchat.rb', line 40 def warning_color @warning_color end |