Class: RubyXmlNfe::Vol
- Inherits:
-
Object
- Object
- RubyXmlNfe::Vol
- Defined in:
- lib/ruby_xml_nfe/vol.rb
Instance Attribute Summary collapse
-
#esp ⇒ Object
readonly
Returns the value of attribute esp.
-
#pesoB ⇒ Object
readonly
Returns the value of attribute pesoB.
-
#pesoL ⇒ Object
readonly
Returns the value of attribute pesoL.
-
#qVol ⇒ Object
readonly
Returns the value of attribute qVol.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(xml, params) ⇒ Vol
constructor
A new instance of Vol.
Constructor Details
#initialize(xml, params) ⇒ Vol
Returns a new instance of Vol.
4 5 6 7 8 9 10 |
# File 'lib/ruby_xml_nfe/vol.rb', line 4 def initialize(xml, params) @xml = xml @qVol = params[:qVol] @esp = params[:esp] @pesoL = params[:pesoL] @pesoB = params[:pesoB] end |
Instance Attribute Details
#esp ⇒ Object (readonly)
Returns the value of attribute esp.
3 4 5 |
# File 'lib/ruby_xml_nfe/vol.rb', line 3 def esp @esp end |
#pesoB ⇒ Object (readonly)
Returns the value of attribute pesoB.
3 4 5 |
# File 'lib/ruby_xml_nfe/vol.rb', line 3 def pesoB @pesoB end |
#pesoL ⇒ Object (readonly)
Returns the value of attribute pesoL.
3 4 5 |
# File 'lib/ruby_xml_nfe/vol.rb', line 3 def pesoL @pesoL end |
#qVol ⇒ Object (readonly)
Returns the value of attribute qVol.
3 4 5 |
# File 'lib/ruby_xml_nfe/vol.rb', line 3 def qVol @qVol end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
3 4 5 |
# File 'lib/ruby_xml_nfe/vol.rb', line 3 def xml @xml end |
Instance Method Details
#build ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/ruby_xml_nfe/vol.rb', line 12 def build xml.vol do xml.qVol qVol if qVol xml.esp esp if esp xml.pesoL pesoL xml.pesoB pesoB end end |