我读的https://github.com/plataformatec/devise一些源代码,发现该行的代码:字符串块(<< - BLOCK,param1,param2)是什么意思?
class_eval <<-URL_HELPERS, __FILE__, __LINE__ + 1
什么PARAMS __FILE__
和__LINE__ + 1
确实在块声明(字符串中的块的关系没有这些PARAMS什么样的变化)?
https://github.com/plataformatec/devise/blob/master/lib/devise/controllers/url_helpers.rb#L47
感谢
我的意思是params对字符串块声明的影响,而不是class_eval方法 – daniloisr 2012-03-23 14:10:26
@daniloisr我已经更新了答案。 – 2012-03-23 14:18:56
不错,我无法想象。非常感谢你=) – daniloisr 2012-03-23 14:27:43