Module: Guard::TypeScript::Formatter
- Defined in:
- lib/guard/typescript/formatter.rb
Overview
The Guard::TypeScript 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/typescript/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/typescript/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/typescript/formatter.rb', line 17 def info(, = { }) ::Guard::UI.info(, ) end |
.notify(message, options = { }) ⇒ Object
Outputs a system notification.
59 60 61 |
# File 'lib/guard/typescript/formatter.rb', line 59 def notify(, = { }) ::Guard::Notifier.notify(, ) end |
.success(message, options = { }) ⇒ Object
Print a green success message to the console.
47 48 49 50 |
# File 'lib/guard/typescript/formatter.rb', line 47 def success(, = { }) = "#{Time.now.strftime('%r')} #{}" ::Guard::UI.info(color(, ';32'), ) end |