Module: Clowne::Ext::ORMExt
- Defined in:
- lib/clowne/ext/orm_ext.rb
Overview
Adds #cloner_class method to ORM base model
Instance Method Summary collapse
Instance Method Details
#cloner_class ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/clowne/ext/orm_ext.rb', line 11 def cloner_class return @_clowne_cloner if instance_variable_defined?(:@_clowne_cloner) cloner = "#{name}Cloner".constantize return @_clowne_cloner = cloner if cloner && cloner <= Clowne::Cloner @_clowne_cloner = superclass.cloner_class if superclass.respond_to?(:cloner_class) end |