Module: Guard::CoffeeScript::Formatter
- Defined in:
- lib/guard/coffeescript/formatter.rb
Overview
The Guard::CoffeeScript 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.
25 26 27 |
# File 'lib/guard/coffeescript/formatter.rb', line 25 def debug(, = {}) Compat::UI.debug(, ) end |
.error(message, options = {}) ⇒ Object
Print a red error message to the console.
35 36 37 |
# File 'lib/guard/coffeescript/formatter.rb', line 35 def error(, = {}) Compat::UI.error(color(, ';31'), ) end |
.info(message, options = {}) ⇒ Object
Print an info message to the console.
15 16 17 |
# File 'lib/guard/coffeescript/formatter.rb', line 15 def info(, = {}) Compat::UI.info(, ) end |
.notify(message, options = {}) ⇒ Object
Outputs a system notification.
57 58 59 |
# File 'lib/guard/coffeescript/formatter.rb', line 57 def notify(, = {}) Compat::UI.notify(, ) end |
.success(message, options = {}) ⇒ Object
Print a green success message to the console.
45 46 47 48 |
# File 'lib/guard/coffeescript/formatter.rb', line 45 def success(, = {}) = "#{Time.now.strftime('%r')} #{message}" Compat::UI.info(color(, ';32'), ) end |