A
Anthony Ob
How to call a class from another script?
How to call a class from another script?
class Dog
def bark
puts "woof"
end
end
ripple:/tmp$ irb
What if i didnt use def?
and I want to add the name class from this script:
puts "Hello, what is your name?"
=A0 =A0 =A0name =3D gets.chomp
Date: Sat=2C 26 Feb 2011 13:39:36 +0900
From: (e-mail address removed)
Subject: Re: How to call a class from another script?
To: (e-mail address removed)
=20
==20
=20
That dog wouldn't bark
=20
Maybe you should ask a more specific question=2C or run through a
basic tutorial on Ruby first.
=20
--=20
Hassan Schroeder ------------------------ (e-mail address removed)
twitter: @hassan
=20
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.