Module: Guard::RSpectacle::Formatter
- Defined in:
- lib/guard/rspectacle/formatter.rb
Overview
The Guard::RSpectacle formatter collects console and system notification methods and enhances them with some color information.
Class Method Summary collapse
-
.debug(message, options = { }) ⇒ Object
Print a debug message to the console.
-
.error(message, options = { }) ⇒ Object
Print a red error message to the console.
-
.info(message, options = { }) ⇒ Object
Print an info message to the console.
-
.notify(message, options = { }) ⇒ Object
Outputs a system notification.
-
.success(message, options = { }) ⇒ Object
Print a green success message to the console.
Class Method Details
.debug(message, options = { }) ⇒ Object
Print a debug message to the console.
27 28 29 |
# File 'lib/guard/rspectacle/formatter.rb', line 27 def debug(, = { }) ::Guard::UI.debug(, ) end |
.error(message, options = { }) ⇒ Object
Print a red error message to the console.
37 38 39 |
# File 'lib/guard/rspectacle/formatter.rb', line 37 def error(, = { }) ::Guard::UI.error(color(, ';31'), ) end |
.info(message, options = { }) ⇒ Object
Print an info message to the console.
17 18 19 |
# File 'lib/guard/rspectacle/formatter.rb', line 17 def info(, = { }) ::Guard::UI.info(, ) end |
.notify(message, options = { }) ⇒ Object
Outputs a system notification.
58 59 60 |
# File 'lib/guard/rspectacle/formatter.rb', line 58 def notify(, = { }) ::Guard::Notifier.notify(, ) end |
.success(message, options = { }) ⇒ Object
Print a green success message to the console.
47 48 49 |
# File 'lib/guard/rspectacle/formatter.rb', line 47 def success(, = { }) ::Guard::UI.info(color(, ';32'), ) end |