On 17 June, 05:47, mak pandian <[email protected]> wrote:
> I have been doing Ruby meta programming Homework.in method_missing function
> i want to find out the length of method name.
> i used method_name.length for that.But i could not find it.I got error like
> symbol can not be converted to string.
> How can i fix it??

Hi LolluraniPandian,

There is a method to_s defined in the class Symbol so you can do
something like this:

:some_symbol.to_s

and you have a string :)

> --
> Regards
> KolluraniPandian A
> (Living in Virtual World)
--
Regards,

Michal Pawlowski
http://www.misza.co.uk/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to