Class: RubyXmlNfe::Dup

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Dup



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

def initialize(xml, params)
  @xml = xml
  @nDup = params[:nDup]
  @dVenc = params[:dVenc]
  @vDup = params[:vDup]
end

Instance Attribute Details

#dVencObject (readonly)

Returns the value of attribute dVenc.



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

def dVenc
  @dVenc
end

#nDupObject (readonly)

Returns the value of attribute nDup.



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

def nDup
  @nDup
end

#vDupObject (readonly)

Returns the value of attribute vDup.



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

def vDup
  @vDup
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#buildObject



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

def build
  xml.dup_ do
    xml.nDup nDup
    xml.dVenc dVenc
    xml.vDup vDup
  end
end