Module: Mongoid::Moneys

Defined in:
lib/money/mongoid.rb

Class Method Summary collapse

Class Method Details

.classes=(klass) ⇒ Object



50
51
52
# File 'lib/money/mongoid.rb', line 50

def classes= klass
  macros.each {|m| send("#{m.to_s.underscore}_class=", klass) }
end

.macro_mapObject



54
55
56
57
58
59
60
# File 'lib/money/mongoid.rb', line 54

def macro_map
  {
    :costing => :cost,
    :priced_at => :price,
    :valued_at => :value
  }
end

.macrosObject



26
27
28
# File 'lib/money/mongoid.rb', line 26

def self.macros
  [:value, :price, :cost]
end