Class: Nfe::Helpers::XmlModel::Factory
- Inherits:
-
Object
- Object
- Nfe::Helpers::XmlModel::Factory
- Defined in:
- lib/nfe/helpers/xml_model/factory.rb
Class Method Summary collapse
Class Method Details
.create(name, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/nfe/helpers/xml_model/factory.rb', line 5 def self.create(name, ={}) type = [:type] || :text if type == :attribute AttributeNodeattribute.new(name, ) else XmlModel::const_get("Attribute#{type.capitalize}").new(name, ) end end |