Class: BrDanfe::DanfeLib::NfeLib::Infadic

Inherits:
Object
  • Object
show all
Defined in:
lib/br_danfe/danfe_lib/nfe_lib/infadic.rb

Constant Summary collapse

Y_POSITION =
27.04 + SPACE_BETWEEN_GROUPS

Instance Method Summary collapse

Constructor Details

#initialize(pdf, xml) ⇒ Infadic

Returns a new instance of Infadic.



7
8
9
10
11
12
# File 'lib/br_danfe/danfe_lib/nfe_lib/infadic.rb', line 7

def initialize(pdf, xml)
  @pdf = pdf
  @xml = xml
  @title_position = Y_POSITION - 0.41
  @y_position = Y_POSITION
end

Instance Method Details

#render(volumes_number) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/br_danfe/danfe_lib/nfe_lib/infadic.rb', line 14

def render(volumes_number)
  render_title
  render_subtitle
  render_volumes if volumes_number > 1
  render_additional_data generate_y_position(volumes_number) if additional_data?
  render_reserved_fisco
end