Hi everyone! I''m looking at the following code: total=total+time_in["time"].to_f What exactly is to_f because I cannot find it in the API? Thanks, Gabor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
to float http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_bignum.html#Bignum.to_f On 5/24/07, gabordemeter <gabordemeter-YbzV19J7KiEAvxtiuMwx3w@public.gmane.org> wrote:> > > Hi everyone! > > I''m looking at the following code: > > total=total+time_in["time"].to_f > > > What exactly is to_f because I cannot find it in the API? > > > Thanks, > > Gabor > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sry, if you go to the ruby-doc.org site and click on the programm ruby reference.. press ctrl+f and look for to_f. I clicked on the first link which was for BigNum.. it also converts other data types.. On 5/24/07, Lance Carlson <lancecarlson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > to float > > > http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_bignum.html#Bignum.to_f > > On 5/24/07, gabordemeter <gabordemeter-YbzV19J7KiEAvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hi everyone! > > > > I''m looking at the following code: > > > > total=total+time_in["time"].to_f > > > > > > What exactly is to_f because I cannot find it in the API? > > > > > > Thanks, > > > > Gabor > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---