Class: RubyXmlNfe::DatPag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ DatPag

Returns a new instance of DatPag.



5
6
7
8
9
10
# File 'lib/ruby_xml_nfe/dat_pag.rb', line 5

def initialize(xml, params)
  @xml = xml
  @indPag = params[:indPag]
  @tPag = params[:tPag]
  @vPag = params[:vPag]
end

Instance Attribute Details

#indPagObject (readonly)

Returns the value of attribute indPag.



3
4
5
# File 'lib/ruby_xml_nfe/dat_pag.rb', line 3

def indPag
  @indPag
end

#tPagObject (readonly)

Returns the value of attribute tPag.



3
4
5
# File 'lib/ruby_xml_nfe/dat_pag.rb', line 3

def tPag
  @tPag
end

#vPagObject (readonly)

Returns the value of attribute vPag.



3
4
5
# File 'lib/ruby_xml_nfe/dat_pag.rb', line 3

def vPag
  @vPag
end

#xmlObject (readonly)

Returns the value of attribute xml.



3
4
5
# File 'lib/ruby_xml_nfe/dat_pag.rb', line 3

def xml
  @xml
end

Instance Method Details

#buildObject



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

def build
  xml.detPag do
    xml.indPag indPag
    xml.tPag tPag
    xml.vPag vPag
  end
end