SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Using IRB

  1. #1
    Once I was a Factory Worker goofy's Avatar
    Join Date
    Dec 2004
    Location
    Sydney Australia
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using IRB

    I'm learning Ruby and I'm using IRB to create a class just to learn. Is there a way to look at you class code once you've created it in IRB?
    Goofy
    Life is what you make it!
    Follow your dreams!

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    1. Navigate to the directory containing your file (in the terminal).
    2. Start irb
    3. Type this as your first line, replacing the quoted string with the name of your ruby script:
    Code:
    require 'carpark'
    4. Work with your class.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •