From 52c034aecb365c6cf2a41b8648c3e87fb335fdaf Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 4 Aug 2006 18:05:50 +0000 Subject: Documentation cleanup. Includes patches by Hugh Sasse: * ping.rb * weakref.rb * mailread.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mutex_m.rb | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'lib/mutex_m.rb') 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) -- cgit v1.2.3