Class: Guard::CoffeeScript
- Defined in:
- lib/guard/coffeescript.rb,
lib/guard/coffeescript/runner.rb,
lib/guard/coffeescript/formatter.rb,
lib/guard/coffeescript/inspector.rb
Defined Under Namespace
Modules: Formatter, Inspector, Runner
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ CoffeeScript
constructor
A new instance of CoffeeScript.
- #run_all ⇒ Object
- #run_on_change(paths) ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ CoffeeScript
Returns a new instance of CoffeeScript.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/guard/coffeescript.rb', line 12 def initialize(watchers = [], = {}) watchers = [] if !watchers defaults = { :bare => false, :shallow => false, :hide_success => false, } if [:input] defaults.merge!({ :output => [:input] }) watchers << ::Guard::Watcher.new(%r{^#{ .delete(:input) }/(.+\.coffee)$}) end super(watchers, defaults.merge()) end |
Instance Method Details
#run_all ⇒ Object
28 29 30 |
# File 'lib/guard/coffeescript.rb', line 28 def run_all run_on_change(Watcher.match_files(self, Dir.glob(File.join('**', '*.coffee')))) end |