[jruby-dev] How to cast object in ruby

2009-03-31 Thread tonyaim83
Hi Java code Shape s1= obj.getShape(); s1.draw(); Circle c1 = (Circle)obj.getShape(); c1.getRadius(); It's equivalent ruby code s1 = obj.getShape s1.draw c1 = obj.getShape c1.getRadius Now here i cannot use the type cast as i have used in java so not able to invoke th

Re: [jruby-dev] How to cast object in ruby

2009-03-31 Thread tonyaim83
Thanks i got it .. It's working fine for me now. Charles Oliver Nutter-2 wrote: > > tonyaim83 wrote: >> Hi >> Java code >> >> Shape s1= obj.getShape(); >> s1.draw(); >> >> Circle c1 = (Circle)obj.getShape(); >> c1