Ruby Instance Methods and Variables
问题 There is something that i don't understand about ruby class instance variable or methods** . So i have this code that keeps on giving me this error and i cant understand Looks ruby thinks that i am trying to call for Float.in_celsius but I want to make this call within my class instance. #----------------------------------- def ftoc(fr) fr = fr.to_f if (fr == 32) c = 0 elsif (fr == 212) c = 100 else c = (fr-32.0)*(5.0/9.0) end return c end def ctof (cl) cl = cl.to_f f = (cl*(9.0/5.0))+32.0