Lib类中的用户帮助程序函数

在rails 3中,是否可以在库类中使用辅助函数? 例如,我有帮手:

module CarHelper def total_price(cars) #Do something here end end 

在我的Lib / my_library.rb中

 class MyLibrary def myFunc # I would like to use helper function total_price(cars) here end 

结束

如何在Lib类中使用辅助函数?

包括你的MyLibrary课程中的CarHelper应该做的工作。