Class: Cfdi40::ConceptoImpuestos

Inherits:
Node
  • Object
show all
Defined in:
lib/cfdi40/concepto_impuestos.rb

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

#traslado_ivaObject



27
28
29
# File 'lib/cfdi40/concepto_impuestos.rb', line 27

def traslado_iva
  traslados.traslado_iva
end

#traslado_nodesObject



21
22
23
24
25
# File 'lib/cfdi40/concepto_impuestos.rb', line 21

def traslado_nodes
  return [] if traslados_node.nil?

  traslados_node.traslado_nodes
end

#trasladosObject



8
9
10
11
12
13
14
15
# File 'lib/cfdi40/concepto_impuestos.rb', line 8

def traslados
  return @traslados if defined?(@traslados)

  @traslados = Traslados.new
  @traslados.parent_node = self
  children_nodes << @traslados
  @traslados
end

#traslados_nodeObject



17
18
19
# File 'lib/cfdi40/concepto_impuestos.rb', line 17

def traslados_node
  children_nodes.select { |n| n.is_a?(Traslados) }.first
end