Class: RubyXmlNfe::Transp

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Transp

Returns a new instance of Transp.



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

def initialize(xml, params)
  @xml = xml
  @modFrete = params[:modFrete]
  @vol_params = params[:vol]
end

Instance Attribute Details

#modFreteObject (readonly)

Returns the value of attribute modFrete.



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

def modFrete
  @modFrete
end

#vol_paramsObject (readonly)

Returns the value of attribute vol_params.



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

def vol_params
  @vol_params
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#buildObject



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

def build
  xml.transp do
    xml.modFrete modFrete
    ipi_int = RubyXmlNfe::Vol.new(xml, vol_params)
    ipi_int.build
  end
end