Martin DeMello wrote:
> On Wed, Apr 22, 2009 at 4:00 AM, Ahmed Abdelsalam <ahmed / amanzitel.com> 
> wrote:
>> manner?
>>
>> Any help?
> 
> method_missing should do it
> 
> irb(main):001:0> class Cells
> irb(main):002:1>   def method_missing(meth, *args)
> irb(main):003:2>     print "you tried to access cell #{meth}"
> irb(main):004:2>   end
> irb(main):005:1> end
> irb(main):006:0> cells = Cells.new
> irb(main):007:0> cells.a1
> you tried to access cell a1
> 
> martin

Thanks martin for your response. I've tried it with ruby and it's OK. 
Actually my objective is to run it with JRuby, but the same code is 
giving error:
at (unknown).(unknown)(Unknown Source)
  at #<Class:01x114025>.method_missing(<unknown>:1)
  at (unknown).(unknown)(:1)

Any suggestion?

Regards,..

Ahmed
-- 
Posted via http://www.ruby-forum.com/.