Hi --

On Sat, 22 Oct 2005, Ryan Leavengood wrote:

> On 10/21/05, Glenn M. Lewis <noSpam / nospam.com> 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