Class: Guard::Lilypond
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Lilypond
constructor
Initializes a Guard plugin.
-
#run_on_additions(paths) ⇒ Object
Called on file(s) additions that the Guard plugin watches.
-
#run_on_modifications(paths) ⇒ Object
Called on file(s) modifications that the Guard plugin watches.
-
#run_on_removals(paths) ⇒ Object
Called on file(s) removals that the Guard plugin watches.
-
#start ⇒ Object
Called once when Guard starts.
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Lilypond
Initializes a Guard plugin. Don’t do any work here, especially as Guard plugins get initialized even if they are not in an active group!
18 19 20 |
# File 'lib/guard/lilypond.rb', line 18 def initialize(watchers = [], = {}) super end |
Instance Method Details
#run_on_additions(paths) ⇒ Object
Called on file(s) additions that the Guard plugin watches.
37 38 39 |
# File 'lib/guard/lilypond.rb', line 37 def run_on_additions(paths) compile_files(paths) end |
#run_on_modifications(paths) ⇒ Object
Called on file(s) modifications that the Guard plugin watches.
47 48 49 |
# File 'lib/guard/lilypond.rb', line 47 def run_on_modifications(paths) compile_files(paths) end |
#run_on_removals(paths) ⇒ Object
Called on file(s) removals that the Guard plugin watches.
57 58 59 60 61 |
# File 'lib/guard/lilypond.rb', line 57 def run_on_removals(paths) paths.each do |path| ::Guard::UI.info "GuardLilypond: removed #{path}", :reset => true end end |
#start ⇒ Object
Called once when Guard starts. Please override initialize method to init stuff.
27 28 29 |
# File 'lib/guard/lilypond.rb', line 27 def start ::Guard::UI.info 'GuardLilypond: started', :reset => true end |