autoreload, you don’t have to restart your program.

Get Version

0.0.1

What

‘autoreload’ reload libraries when the files are updated.

Installing

sudo gem install autoreload

The Basic

# foo.rb
def foo
  1
end
# sample1.rb
require 'autoreload'
require 'foo'

autoreload(1, true, 'sample1')

loop {
  puts foo
  sleep 1
}

In this situation, run the script ‘sample1.rb’. You see that the number 1 is shown repeatedly. Then, update the file ‘foo.rb’. For example, change the number 1 to 2 and save it. Then, the library automatically check the update and reload it. You’ll see the number 2 is shown.

Documents

Repositry

The trunk repository is svn://rubyforge.org/var/svn/autoreload/trunk for anonymous access.

License

Ruby License.

Contact

Comments are welcome. Send an email to Kouichirou Eto “eto at rubyforge dot org”.

Dr Nic, 5th July 2007
Theme extended from Paul Battley