Class: Cfdi40::ImpuestosP
Instance Attribute Summary
Attributes inherited from Node
#children_nodes, #element_name, #parent_node, #readonly, #xml_document, #xml_parent
Instance Method Summary collapse
Methods inherited from Node
#add_attributes_to, #add_child_node, #add_children_to, #add_namespaces_to, #attibute_is_null?, attributes, #clean_cached_xml, #create_xml_node, #current_namespace, default_values, define_attribute, define_element_name, define_namespace, define_reader, define_writer, #delete_child, element_name, #expanded_element_name, formats, #formatted_value, #initialize, #load_from_ng_node, #lock, namespaces, #set_defaults, verify_class_variables
Constructor Details
This class inherits a constructor from Cfdi40::Node
Instance Method Details
#load_traslados_p_node(ng_node) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/cfdi40/impuestos_p.rb', line 17 def load_traslados_p_node(ng_node) @traslados_p = TrasladosP.new @traslados_p.load_from_ng_node(ng_node) add_child_node @traslados_p ng_node.xpath("//pago20:TrasladoP", { "pago20" => "http://www.sat.gob.mx/Pagos20" }).each do |trsld_p_node| @traslados_p.load_traslado_p(trsld_p_node) end @traslados_p end |
#traslados_p ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/cfdi40/impuestos_p.rb', line 5 def traslados_p return @traslados_p if defined?(@traslados_p) @traslados_p = TrasladosP.new add_child_node @traslados_p @traslados_p end |
#traslados_p_node ⇒ Object
13 14 15 |
# File 'lib/cfdi40/impuestos_p.rb', line 13 def traslados_p_node @children_nodes.select {|child| child.instance_of?(Cfdi40::TrasladosP) }.first end |