Path: website/index.txt
Last Update: Thu Jul 05 23:34:06 +0900 2007

h1. autoreload, you don‘t have to restart your program.

h2. What

‘autoreload’ reload libraries when the files are updated.

h2. Installing

<pre syntax="ruby">sudo gem install autoreload</pre>

h2. The Basic

<pre syntax="ruby"> # foo.rb def foo


end </pre>

<pre syntax="ruby"> # sample1.rb require ‘autoreload’ require ‘foo‘

autoreload(1, true, ‘sample1’)

loop {

  puts foo
  sleep 1

} </pre>

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.

h2. Documents

  • "API Reference":rdoc/

h2. Repositry

The trunk repository is svn:// for anonymous access.

h2. License

Ruby License.

h2. Contact

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