Forum: Ruby Help with modules.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tim M. (Guest)
on 2009-01-13 23:53
I can't seem to find the answer to this but I know I've seen it
somewhere.
I am working with Ncurses, so I start all my files with
require 'rubygems'
require 'Ncurses'

and then I have to type things like:
Ncurses.initscr
Ncurses.keypad(Ncurses.stdscr, TRUE) and etc.

But the thing I want to be able to do is just type
initscr()
keypad(stdscr, TRUE)

and etc! Just using 'include Ncurses', but that doesn't work. Any help?

-- Tim.
Tim M. (Guest)
on 2009-01-13 23:55
Tim M. wrote:
> I can't seem to find the answer to this but I know I've seen it
> somewhere.
> I am working with Ncurses, so I start all my files with
> require 'rubygems'
> require 'Ncurses'
>
> and then I have to type things like:
> Ncurses.initscr
> Ncurses.keypad(Ncurses.stdscr, TRUE) and etc.
>
> But the thing I want to be able to do is just type
> initscr()
> keypad(stdscr, TRUE)
>
> and etc! Just using 'include Ncurses', but that doesn't work. Any help?
>
> -- Tim.

Nevermind, sorry. I expanded my search on these forums a bit and got an
answer.
This topic is locked and can not be replied to.