Class: Guard::Hogan

Inherits:
Guard
  • Object
show all
Defined in:
lib/guard/hogan.rb,
lib/guard/hogan/runner.rb,
lib/guard/hogan/compiler.rb

Defined Under Namespace

Classes: Compiler, Runner

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Hogan.



10
11
12
13
14
15
16
# File 'lib/guard/hogan.rb', line 10

def initialize(watchers=[], options={})
  if options[:input]
    watchers << ::Guard::Watcher.new(/^#{ options[:input] }\/(.+)\.mustache$/)
  end
  @runner = Runner.new(options)
  super(watchers, options)
end

Instance Method Details

#run_allObject



22
23
24
# File 'lib/guard/hogan.rb', line 22

def run_all
  @runner.run(Watcher.match_files(self, Dir.glob('**{,/*/**}/*.mustache')))
end

#run_on_change(paths) ⇒ Object



26
27
28
# File 'lib/guard/hogan.rb', line 26

def run_on_change(paths)
  run_all 
end

#startObject



18
19
20
# File 'lib/guard/hogan.rb', line 18

def start
  run_all
end