Class: Guard::JekyllPlus::Builder::Modifier

Inherits:
Action
  • Object
show all
Defined in:
lib/guard/jekyll_plus/builder/modifier.rb

Instance Method Summary collapse

Methods inherited from Action

#build, #build_was_needed, #copy, #destination_path, #footer, #header, #ignore_stitch_sources, #jekyll_matches, #non_jekyll_matches, #pluralize, #remove, #update

Constructor Details

#initialize(*args) ⇒ Modifier

Returns a new instance of Modifier.



7
8
9
10
11
12
13
14
# File 'lib/guard/jekyll_plus/builder/modifier.rb', line 7

def initialize(*args)
  @msg = 'Files changed: '
  @mark = '  ~ '.yellow
  @name = 'update'
  @activity = 'updating'
  @color = :green
  super
end

Instance Method Details

#do_update(files) ⇒ Object



16
17
18
19
# File 'lib/guard/jekyll_plus/builder/modifier.rb', line 16

def do_update(files)
  header(files)
  files.each { |file| copy(file, destination_path(file)) }
end