« Return to Thread: The simpelest of module function scoping...

Re: The simpelest of module function scoping...

by Joel VanderWerf :: Rate this Message:

Reply to Author | View in Thread

Tom Verbeure wrote:
> It's a little sad that I've written many lines of ruby code, but I
> can't something as simple as this to work:
>
> #! /usr/bin/env ruby
> module T
>
>    def t(x)

      def T.t(x)
or
      def self.t(x)

or wrap in class << self...end, or see ri module_function.

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

 « Return to Thread: The simpelest of module function scoping...