module ModelPresenter::Moneyize
Public Instance Methods
moneyize(*fields)
click to toggle source
# File lib/model_presenter/moneyize.rb, line 3 def moneyize(*fields) fields.each do |field| define_method "formatted_#{field}" do "$ #{Money.new(send(field)).to_dollar}" end end end