ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
in `include': wrong argument type Class ???
by Unbewusst Sein other posts by this author
May 9 2008 9:56AM messages near this date
[ANN] RubyKaigi2008 Tickets and News | Re: in `include': wrong argument type Class ???
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).
-- 
Une Bévue
Thread:
Unbewusst Sein
Unbewusst Sein

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved