class Guard::Assets

Public Class Methods

new(options={}) click to toggle source
Calls superclass method
# File lib/marv/project/guard/assets.rb, line 4
def initialize(options={})
  super
end

Public Instance Methods

build_all_assets(message, clean=nil) click to toggle source

Build all assets

# File lib/marv/project/guard/assets.rb, line 24
def build_all_assets(message, clean=nil)
  builder = Marv::Project::Guard.builder.assets

  UI.info message
  builder.clean_images unless clean.nil?
  builder.copy_images
  builder.build_assets
end
run_all() click to toggle source

Runs on all command in guard console

# File lib/marv/project/guard/assets.rb, line 14
def run_all
  build_all_assets "Rebuilding all assets", true
end
run_on_change(paths) click to toggle source

Called on file(s) modifications

# File lib/marv/project/guard/assets.rb, line 19
def run_on_change(paths)
  build_all_assets "Assets have changed, rebuilding..."
end
start() click to toggle source

Runs on marv watch

# File lib/marv/project/guard/assets.rb, line 9
def start
  build_all_assets "Building all assets"
end