Class: Guard::ForgeAssets

Inherits:
Guard
  • Object
show all
Defined in:
lib/guard/forge/assets.rb

Instance Method Summary collapse

Constructor Details

#initialize(watchers = [], options = {}) ⇒ ForgeAssets

Returns a new instance of ForgeAssets.



7
8
9
# File 'lib/guard/forge/assets.rb', line 7

def initialize(watchers=[], options={})
  super
end

Instance Method Details

#run_allObject

Called on Ctrl-\ signal This method should be principally used for long action like running all specs/tests/…



18
19
20
21
22
# File 'lib/guard/forge/assets.rb', line 18

def run_all
  UI.info "Rebuilding all assets"
  ::Forge::Guard.builder.clean_images
  ::Forge::Guard.builder.build_assets
end

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



25
26
27
28
29
# File 'lib/guard/forge/assets.rb', line 25

def run_on_change(paths)
  UI.info "Assets have changed, rebuilding..."
  ::Forge::Guard.builder.clean_images
  ::Forge::Guard.builder.build_assets
end

#startObject



11
12
13
14
# File 'lib/guard/forge/assets.rb', line 11

def start
  UI.info "Building all assets"
  ::Forge::Guard.builder.build_assets
end