Class: TechnoGate::Contao::Notifier

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/contao/notifier.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.notify(*args, &block) ⇒ Object



19
20
21
# File 'lib/contao/notifier.rb', line 19

def self.notify(*args, &block)
  instance.notify(*args, &block)
end

Instance Method Details

#notify(message, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/contao/notifier.rb', line 9

def notify(message, options = {})
  if ::Guard::UI.send(:color_enabled?)
    message = "\e[0;34mContao>>\e[0m \e[0;32m#{message}\e[0m"
  else
    message = "Contao>> #{message}"
  end

  ::Guard::UI.info(message, options)
end