Class: BrDanfe::DanfeLib::NfceLib::Recipient
- Inherits:
-
Object
- Object
- BrDanfe::DanfeLib::NfceLib::Recipient
- Defined in:
- lib/br_danfe/danfe_lib/nfce_lib/recipient.rb
Instance Method Summary collapse
-
#initialize(pdf, xml) ⇒ Recipient
constructor
A new instance of Recipient.
- #render ⇒ Object
Constructor Details
#initialize(pdf, xml) ⇒ Recipient
Returns a new instance of Recipient.
5 6 7 8 |
# File 'lib/br_danfe/danfe_lib/nfce_lib/recipient.rb', line 5 def initialize(pdf, xml) @pdf = pdf @xml = xml end |
Instance Method Details
#render ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/br_danfe/danfe_lib/nfce_lib/recipient.rb', line 10 def render @pdf.render_blank_line if identified_recipient? render_document @pdf.text @xml['dest/xNome'], @pdf.text BrDanfe::DanfeLib::NfceLib::Helper.address(@xml.css('enderDest')), else @pdf.text 'CONSUMIDOR NÃO IDENTIFICADO', end end |