Class: Guard::Functions
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Functions
- Defined in:
- lib/marv/project/guard/functions.rb
Instance Method Summary collapse
-
#copy_all_functions(message, clean = nil) ⇒ Object
Copy all functions.
-
#initialize(options = {}) ⇒ Functions
constructor
A new instance of Functions.
-
#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 = {}) ⇒ Functions
Returns a new instance of Functions.
4 5 6 |
# File 'lib/marv/project/guard/functions.rb', line 4 def initialize(={}) super end |
Instance Method Details
#copy_all_functions(message, clean = nil) ⇒ Object
Copy all functions
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/marv/project/guard/functions.rb', line 24 def copy_all_functions(, clean=nil) builder = Marv::Project::Guard.builder.functions UI.info unless clean.nil? builder.clean_functions builder.clean_includes builder.clean_folders Marv::Project::Guard.builder.assets.build_assets end builder.copy_functions builder.copy_includes builder.copy_folders end |
#run_all ⇒ Object
Runs on all command in guard console
14 15 16 |
# File 'lib/marv/project/guard/functions.rb', line 14 def run_all copy_all_functions "Rebuilding all functions", true end |
#run_on_change(paths) ⇒ Object
Called on file(s) modifications
19 20 21 |
# File 'lib/marv/project/guard/functions.rb', line 19 def run_on_change(paths) copy_all_functions "Functions have changed, copying over" end |
#start ⇒ Object
Runs on marv watch
9 10 11 |
# File 'lib/marv/project/guard/functions.rb', line 9 def start copy_all_functions "Copying functions over" end |