diff options
Diffstat (limited to 'lib/mutex_m.rb')
-rw-r--r-- | lib/mutex_m.rb | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/lib/mutex_m.rb b/lib/mutex_m.rb index 0192d83bee..8e0d42bc8d 100644 --- a/lib/mutex_m.rb +++ b/lib/mutex_m.rb @@ -1,4 +1,4 @@ -# +#-- # mutex_m.rb - # $Release Version: 3.0$ # $Revision: 1.7 $ @@ -7,22 +7,26 @@ # by Keiju ISHITSUKA(keiju@ishitsuka.com) # modified by matz # patched by akira yamada +#++ +# +# == Usage +# +# Extend an object and use it like a Mutex object: +# +# require "mutex_m.rb" +# obj = Object.new +# obj.extend Mutex_m +# # ... # -# -- -# Usage: -# require "mutex_m.rb" -# obj = Object.new -# obj.extend Mutex_m -# ... -# extended object can be handled like Mutex -# or -# class Foo -# include Mutex_m -# ... -# end -# obj = Foo.new -# this obj can be handled like Mutex +# Or, include Mutex_m in a class to have its instances behave like a Mutex +# object: # +# class Foo +# include Mutex_m +# # ... +# end +# +# obj = Foo.new module Mutex_m def Mutex_m.define_aliases(cl) |