Class: RGen::AutoCreatedClass
- Defined in:
- lib/rgen/auto_class_creator.rb
Instance Method Summary collapse
Methods inherited from Base
Methods included from MetamodelBuilder
Constructor Details
This class inherits a constructor from RGen::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rgen/auto_class_creator.rb', line 16 def method_missing(m,*args) return super unless self.class.parent.accEnabled if m.to_s =~ /(.*)=$/ self.class.has_one($1) send(m,args[0]) elsif args.size == 0 self.class.has_many(m) send(m) end end |