in `include': wrong argument type Class ???

U

Une Bévue

i did something like :

module ManPage
MANPATH=[<an array of pathes to man>]
MANSEC=[<an array of sections>]
end

class Page
include ManPage

attr_accessor :manpath,:section,:page,:count,:key

def initialize(manpath,section,page)
...
end

using that from another script:

require 'man_rep/manpage' #requires the file where are the module
ManPage and the class Page

include ManPage

and the error come in this line (just above) ?

why ? what did i misunderstood ?

the purpose of the "module" is only to get the two arrays MANPATH and
MANSEC common to both the class Page and any script using this class
Page.

i should mention, the script itself is a cgi script working under
mod_ruby (Apache2).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top