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