class BrDanfe::CceLib::NfeKey
Public Class Methods
new(pdf, xml)
click to toggle source
# File lib/br_danfe/cce_lib/nfe_key.rb, line 4 def initialize(pdf, xml) @pdf = pdf @xml = Nokogiri::XML(xml) end
Public Instance Methods
render()
click to toggle source
# File lib/br_danfe/cce_lib/nfe_key.rb, line 9 def render @pdf.box(height: 36) do @pdf.text I18n.t('cce.key'), size: 8, style: :bold @pdf.text nfe_key, pad: 5 end end
Private Instance Methods
nfe_key()
click to toggle source
# File lib/br_danfe/cce_lib/nfe_key.rb, line 18 def nfe_key node = @xml.css('procEventoNFe > evento > infEvento > chNFe') node ? node.text : '' end