Class: RubyXmlNfe::Fat

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Fat

Returns a new instance of Fat.



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

def initialize(xml, params)
  @xml = xml
  @nFat  = params[:nFat]
  @vOrig = params[:vOrig]
  @vDesc = params[:vDesc]
  @vLiq  = params[:vLiq]
end

Instance Attribute Details

#nFatObject (readonly)

Returns the value of attribute nFat.



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

def nFat
  @nFat
end

#vDescObject (readonly)

Returns the value of attribute vDesc.



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

def vDesc
  @vDesc
end

#vLiqObject (readonly)

Returns the value of attribute vLiq.



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

def vLiq
  @vLiq
end

#vOrigObject (readonly)

Returns the value of attribute vOrig.



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

def vOrig
  @vOrig
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#buildObject



13
14
15
16
17
18
19
20
# File 'lib/ruby_xml_nfe/fat.rb', line 13

def build
  xml.fat do
    xml.nFat nFat
    xml.vOrig vOrig
    xml.vDesc vDesc
    xml.vLiq vLiq
  end
end