Class: Guard::Ruby

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/ruby.rb

Constant Summary collapse

VERSION =
Guard::GUARD_RUBY_VERSION

Instance Method Summary collapse

Instance Method Details

#run_allObject



12
13
14
# File 'lib/guard/ruby.rb', line 12

def run_all
  run_on_change(Compat.matching_files(self, Dir.glob('*.rb')))
end

#run_on_change(paths) ⇒ Object



16
17
18
# File 'lib/guard/ruby.rb', line 16

def run_on_change(paths)
  paths.each {|path| system("ruby #{path}")}
end

#startObject



8
9
10
# File 'lib/guard/ruby.rb', line 8

def start
  run_all if options[:all_on_start]
end