Class: Guard::Assets
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Assets
- Defined in:
- lib/marv/project/guard/assets.rb
Instance Method Summary collapse
-
#build_all_assets(message, clean = nil) ⇒ Object
Build all assets.
-
#initialize(options = {}) ⇒ Assets
constructor
A new instance of Assets.
-
#run_all ⇒ Object
Runs on all command in guard console.
-
#run_on_change(paths) ⇒ Object
Called on file(s) modifications.
-
#start ⇒ Object
Runs on marv watch.
Constructor Details
#initialize(options = {}) ⇒ Assets
Returns a new instance of Assets.
4 5 6 |
# File 'lib/marv/project/guard/assets.rb', line 4 def initialize(={}) super end |
Instance Method Details
#build_all_assets(message, clean = nil) ⇒ Object
Build all assets
24 25 26 27 28 29 30 31 |
# File 'lib/marv/project/guard/assets.rb', line 24 def build_all_assets(, clean=nil) builder = Marv::Project::Guard.builder.assets UI.info builder.clean_images unless clean.nil? builder.copy_images builder.build_assets end |
#run_all ⇒ Object
Runs on all command in guard console
14 15 16 |
# File 'lib/marv/project/guard/assets.rb', line 14 def run_all build_all_assets "Rebuilding all assets", true end |
#run_on_change(paths) ⇒ Object
Called on file(s) modifications
19 20 21 |
# File 'lib/marv/project/guard/assets.rb', line 19 def run_on_change(paths) build_all_assets "Assets have changed, rebuilding..." end |
#start ⇒ Object
Runs on marv watch
9 10 11 |
# File 'lib/marv/project/guard/assets.rb', line 9 def start build_all_assets "Building all assets" end |