Class: Guard::MyPlugin

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/compat/example.rb

Instance Attribute Summary

Attributes inherited from Plugin

#options

Instance Method Summary collapse

Methods inherited from Plugin

#initialize, #old_initialize

Constructor Details

This class inherits a constructor from Guard::Plugin

Instance Method Details

#run_allObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/guard/compat/example.rb', line 17

def run_all
  Guard::Compat::UI.notify('foo', bar: :baz)
  Guard::Compat::UI.color('foo', :white)

  Guard::Compat::UI.info('foo', bar: :baz)
  Guard::Compat::UI.warning('foo', bar: :baz)
  Guard::Compat::UI.error('foo', bar: :baz)
  Guard::Compat::UI.debug('foo', bar: :baz)
  Guard::Compat::UI.deprecation('foo', bar: :baz)
end

#run_on_modificationsObject



28
29
30
31
32
# File 'lib/guard/compat/example.rb', line 28

def run_on_modifications
  Guard::Compat::UI.color_enabled?
  Guard::Compat.matching_files(self, ['foo'])
  Guard::Compat.watched_directories
end

#startObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/guard/compat/example.rb', line 6

def start
  Guard::Compat::UI.notify('foo')
  Guard::Compat::UI.color('foo')

  Guard::Compat::UI.info('foo')
  Guard::Compat::UI.warning('foo')
  Guard::Compat::UI.error('foo')
  Guard::Compat::UI.debug('foo')
  Guard::Compat::UI.deprecation('foo')
end