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

Discussion in 'Ruby' started by Une Bévue, May 9, 2008.

  1. Une Bévue

    Une Bévue Guest

    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
    Une Bévue, May 9, 2008
    #1
    1. Advertising

  2. Une Bévue

    Une Bévue Guest

    Une Bévue <> wrote:

    > why ?


    it was a caching problem, restarting the server did the trick...
    --
    Une Bévue
    Une Bévue, May 9, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sheldon
    Replies:
    5
    Views:
    6,152
    Willem
    Nov 6, 2007
  2. Andreas Bogenberger
    Replies:
    3
    Views:
    888
    Andreas Bogenberger
    Feb 22, 2008
  3. Tim Kynerd
    Replies:
    12
    Views:
    267
    Yukihiro Matsumoto
    Nov 28, 2003
  4. Replies:
    0
    Views:
    184
  5. Ryan Dupuis
    Replies:
    8
    Views:
    1,219
    Eric Sosman
    Oct 2, 2013
Loading...

Share This Page