Module: Capital
- Defined in:
- lib/capital.rb
Instance Method Summary collapse
Instance Method Details
#rich(column, klass) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/capital.rb', line 5 def rich(column, klass) composed_of column, :allow_nil => true, :class_name => klass.name, :constructor => :from_database, :converter => proc{|v| klass === v ? v : klass.from_database(v) }, :mapping => [column, :to_database] end |