Class: OpenEHR::RM::Factory
- Inherits:
-
Object
- Object
- OpenEHR::RM::Factory
- Defined in:
- lib/openehr/rm/factory.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(cobject) ⇒ Factory
constructor
A new instance of Factory.
Constructor Details
#initialize(cobject) ⇒ Factory
Returns a new instance of Factory.
6 7 8 |
# File 'lib/openehr/rm/factory.rb', line 6 def initialize(cobject) @cobject = cobject end |
Class Method Details
.create(type, *param) ⇒ Object
11 12 13 14 |
# File 'lib/openehr/rm/factory.rb', line 11 def create(type, *param) type = type.downcase.camelize if type.include? '_' class_eval("#{type}Factory").create(*param) end |