Loading ...
Sorry, an error occurred while loading the content.

Re: [honolulu-coders] understanding ruby-doc

Expand Messages
  • Thomas Olausson
    require shell because require is basically import file , not import class by name . /Thomas
    Message 1 of 2 , May 1, 2007
    View Source
    • 0 Attachment
      require 'shell'
      because require is basically "import file", not "import class by name".

      /Thomas

      On Apr 30, 2007, at 7:45 PM, Dave Burns wrote:

      http://www.ruby-doc.org/core/classes/Shell.html describes an
      interesting class Shell. Since it is in the core, I tried just using
      it, requiring it, etc. How do I access it? I can even find the file it
      is in - I just can't figure out how to put it in scope.

      irb
      irb(main):001:0> Shell.new
      NameError: uninitialized constant Shell
      from (irb):1
      irb(main):002:0> require Shell
      NameError: uninitialized constant Shell
      from (irb):2
      irb(main):003:0> require Object::Shell
      NameError: uninitialized constant Shell
      from (irb):3
      from :0

      Dave


    Your message has been successfully submitted and would be delivered to recipients shortly.