class BrDanfe::CceLib::Protocol
Public Class Methods
new(pdf, xml)
click to toggle source
# File lib/br_danfe/cce_lib/protocol.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/protocol.rb, line 9 def render @pdf.box(height: 36) do @pdf.text I18n.t('cce.protocol'), size: 8, style: :bold @pdf.text protocol, pad: 5 end end
Private Instance Methods
protocol()
click to toggle source
# File lib/br_danfe/cce_lib/protocol.rb, line 18 def protocol node = @xml.css('procEventoNFe > retEvento > infEvento > nProt') node ? node.text : '' end