Module: Nfe::Helpers::XmlModel::NfeModel::ClassMethods
- Defined in:
- lib/nfe/helpers/xml_model/nfe_model.rb
Instance Method Summary collapse
- #attr_xml(xml_attr, options = {}) ⇒ Object
- #xml_attribute(attribute) ⇒ Object
- #xml_attributes ⇒ Object
Instance Method Details
#attr_xml(xml_attr, options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/nfe/helpers/xml_model/nfe_model.rb', line 10 def attr_xml(xml_attr, ={}) register_xml_attr xml_attr, register_attr_acessor xml_attribute(xml_attr) end |
#xml_attribute(attribute) ⇒ Object
23 24 25 |
# File 'lib/nfe/helpers/xml_model/nfe_model.rb', line 23 def xml_attribute(attribute) xml_attributes[attribute] end |
#xml_attributes ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/nfe/helpers/xml_model/nfe_model.rb', line 15 def xml_attributes @xml_attributes ||= {} if self.superclass.methods.include?(:xml_attributes) @xml_attributes = self.superclass.xml_attributes.merge @xml_attributes end @xml_attributes end |