I have read the documentation and am now browsing sample code to learn
more about ruby. The following code, export.rb, triggers some questions:

1)  What does "public :printf" do in class Foo?

2)  I thought a module defined outside a class was, by default, attached
to Object and was private, such as "def foobar" below.  Why is a
redefinition of class Foo required to change foobar() to public?  Why is
the "public :foobar" statement not immediatly after the  def of foobar? 
Does this mean that public/private access to an given Object method be
private in one subclass and public in another?  A concept something like
singleton methods? 

# method access permission
# output:
#	foobar
#	Foo

class Foo
  public :printf
  def baz
    print "baz\n"
  end
  private :baz

  def quux
    print "in QUUX "
    baz()
  end
end

def foobar
  print "foobar\n"
end 

f = Foo.new
#Foo.private :printf
class Foo			# redefines foobar's scope
  public :foobar
end
f.foobar
f.printf "%s\n", Foo

f.quux

class Bar<Foo
  def quux
    super
    baz()
  end
end

Bar.new.quux

-- 
Small is Beautiful