class Guard::Fasterer
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/guard/fasterer.rb, line 5 def initialize(options = {}) super @options = { run_on_start: false, bundler: File.exist?("#{Dir.pwd}/Gemfile") }.merge(options) end
Public Instance Methods
bundler?()
click to toggle source
# File lib/guard/fasterer.rb, line 13 def bundler? @options[:bundler] end
reload()
click to toggle source
# File lib/guard/fasterer.rb, line 30 def reload true end
run_all()
click to toggle source
# File lib/guard/fasterer.rb, line 34 def run_all Kernel.system(fasterer_command) end
run_on_change(_paths)
click to toggle source
# File lib/guard/fasterer.rb, line 38 def run_on_change(_paths) system(fasterer_command) end
run_on_start?()
click to toggle source
# File lib/guard/fasterer.rb, line 17 def run_on_start? @options[:run_on_start] end
start()
click to toggle source
# File lib/guard/fasterer.rb, line 21 def start Kernel.system(fasterer_command) if run_on_start? true end
stop()
click to toggle source
# File lib/guard/fasterer.rb, line 26 def stop true end
Private Instance Methods
fasterer_command()
click to toggle source
# File lib/guard/fasterer.rb, line 44 def fasterer_command cmd = [] cmd << 'bundle exec' if bundler? cmd << 'fasterer' cmd.join(' ') end