Class: BrDanfe::DanfeLib::NfeLib::Dest
- Inherits:
-
Object
- Object
- BrDanfe::DanfeLib::NfeLib::Dest
- Defined in:
- lib/br_danfe/danfe_lib/nfe_lib/dest.rb
Constant Summary collapse
- Y =
10.00
- MAXIMUM_SIZE_FOR_STREET =
319
Instance Method Summary collapse
-
#initialize(pdf, xml) ⇒ Dest
constructor
A new instance of Dest.
- #render ⇒ Object
Constructor Details
#initialize(pdf, xml) ⇒ Dest
Returns a new instance of Dest.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/br_danfe/danfe_lib/nfe_lib/dest.rb', line 8 def initialize(pdf, xml) @pdf = pdf @xml = xml @xml_version_is_310_or_newer = @xml.version_is_310_or_newer? @ltitle = Y - 0.42 @l1 = Y @l2 = Y + LINE_HEIGHT @l3 = Y + (LINE_HEIGHT * 2) end |
Instance Method Details
#render ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/br_danfe/danfe_lib/nfe_lib/dest.rb', line 19 def render @pdf.ititle 0.42, 10.00, 0.75, @ltitle, 'dest.title' render_line1 render_line2 render_line3 @xml_version_is_310_or_newer ? render_dates_for_nfe_310_or_newer : render_dates_for_older_nfes end |