Class: Guard::BustedNotifier
- Inherits:
-
Object
- Object
- Guard::BustedNotifier
- Defined in:
- lib/guard/busted/notifier.rb
Overview
Wrapper for Guard::Notifier to make system notifications
Constant Summary collapse
- FAILURE_TITLE =
'Busted - Failure'
- SUCCESS_TITLE =
'Busted - Success'
Instance Attribute Summary collapse
-
#raw_message ⇒ Object
Returns the value of attribute raw_message.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status) ⇒ BustedNotifier
constructor
Initialize BustedNotifier.
-
#notify ⇒ Object
Send notification to the system.
Constructor Details
#initialize(message, status) ⇒ BustedNotifier
Initialize BustedNotifier
17 18 19 20 |
# File 'lib/guard/busted/notifier.rb', line 17 def initialize(, status) @raw_message = @status = status end |
Instance Attribute Details
#raw_message ⇒ Object
Returns the value of attribute raw_message.
8 9 10 |
# File 'lib/guard/busted/notifier.rb', line 8 def @raw_message end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/guard/busted/notifier.rb', line 8 def status @status end |
Instance Method Details
#notify ⇒ Object
Send notification to the system
The type of the notification depends on the status of busted command.
25 26 27 28 29 30 31 |
# File 'lib/guard/busted/notifier.rb', line 25 def notify if status notify_success else notify_failure end end |