From: "David A. Black" Date: 2005-10-22T04:17:46+09:00 Subject: Re: Module question - should be simple, but can't figure it out... Hi -- On Sat, 22 Oct 2005, Ryan Leavengood wrote: > On 10/21/05, Glenn M. Lewis wrote: >> >> QUESTION: How can I create module 'Dummy' so that it can be called >> either with the syntax in 'testdummy.rb' or 'testdummy2.rb' without >> modification? > > module Dummy > def try_me > puts "yo" > end > extend self > end > > include Dummy > try_me > Dummy::try_me Or: Dummy.try_me (I admit I prefer the consistent use of '.' for all method calls, regardless of what the receiver is.) David -- David A. Black dblack@wobblini.net