Class: RubyXmlNfe::Pag

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_xml_nfe/pag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Pag

Returns a new instance of Pag.



7
8
9
10
# File 'lib/ruby_xml_nfe/pag.rb', line 7

def initialize(xml, params)
  @xml = xml
  @dat_pag_params = params[:detPag]
end

Instance Attribute Details

#dat_pag_paramsObject (readonly)

Returns the value of attribute dat_pag_params.



5
6
7
# File 'lib/ruby_xml_nfe/pag.rb', line 5

def dat_pag_params
  @dat_pag_params
end

#xmlObject (readonly)

Returns the value of attribute xml.



5
6
7
# File 'lib/ruby_xml_nfe/pag.rb', line 5

def xml
  @xml
end

Instance Method Details

#buildObject



12
13
14
15
16
17
# File 'lib/ruby_xml_nfe/pag.rb', line 12

def build
  xml.pag do
    det_pag = RubyXmlNfe::DatPag.new(xml, dat_pag_params)
    det_pag.build
  end
end