Class: BrDanfe::DanfeLib::NfceLib::Header
- Inherits:
-
Object
- Object
- BrDanfe::DanfeLib::NfceLib::Header
- Defined in:
- lib/br_danfe/danfe_lib/nfce_lib/header.rb
Instance Method Summary collapse
-
#initialize(pdf, xml, logo, logo_dimensions) ⇒ Header
constructor
A new instance of Header.
- #render ⇒ Object
Constructor Details
#initialize(pdf, xml, logo, logo_dimensions) ⇒ Header
Returns a new instance of Header.
5 6 7 8 9 10 |
# File 'lib/br_danfe/danfe_lib/nfce_lib/header.rb', line 5 def initialize(pdf, xml, logo, logo_dimensions) @pdf = pdf @xml = xml @logo = logo @logo_dimensions = logo_dimensions end |
Instance Method Details
#render ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/br_danfe/danfe_lib/nfce_lib/header.rb', line 12 def render cursor = @pdf.cursor render_company_info render_logo(cursor) if @logo.present? render_doc render_homologation if BrDanfe::Helper.homologation?(@xml) end |