Module: Guard::Helpers::Formatter
- Defined in:
- lib/guard/helpers/formatter.rb
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.
46 47 48 |
# File 'lib/guard/helpers/formatter.rb', line 46 def debug(, = { }) ::Guard::UI.debug(, ) end |
.error(message, options = { }) ⇒ Object
Print a red error message to the console.
56 57 58 |
# File 'lib/guard/helpers/formatter.rb', line 56 def error(, = { }) ::Guard::UI.error(color(, ';31'), ) end |
.info(message, options = { }) ⇒ Object
Print an info message to the console.
36 37 38 |
# File 'lib/guard/helpers/formatter.rb', line 36 def info(, = { }) ::Guard::UI.info(, ) end |
.notify(message, options = { }) ⇒ Object
Outputs a system notification.
78 79 80 |
# File 'lib/guard/helpers/formatter.rb', line 78 def notify(, = { }) ::Guard::Notifier.notify(, ) end |
.success(message, options = { }) ⇒ Object
Print a green success message to the console.
66 67 68 69 |
# File 'lib/guard/helpers/formatter.rb', line 66 def success(, = { }) = "#{Time.now.strftime('%r')} #{message}" ::Guard::UI.info(color(, ';32'), ) end |