Class: NfeReader::Fuel
- Inherits:
-
Object
- Object
- NfeReader::Fuel
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/product/fuel.rb
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#anp ⇒ Object
readonly
Returns the value of attribute anp.
-
#cide_aliquot ⇒ Object
readonly
Returns the value of attribute cide_aliquot.
-
#cide_base ⇒ Object
readonly
Returns the value of attribute cide_base.
-
#cide_value ⇒ Object
readonly
Returns the value of attribute cide_value.
-
#codif ⇒ Object
readonly
Returns the value of attribute codif.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Fuel
constructor
A new instance of Fuel.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Fuel
Returns a new instance of Fuel.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/nfe_reader/product/fuel.rb', line 8 def initialize(attrs = {}) @anp = attrs[:cProdANP] @codif = attrs[:CODIF] @amount = attrs[:qTemp] if attrs[:CIDE] @cide_base = attrs[:CIDE][:qBCprod] @cide_aliquot = attrs[:CIDE][:vAliqProd] @cide_value = attrs[:CIDE][:vCIDE] end end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
6 7 8 |
# File 'lib/nfe_reader/product/fuel.rb', line 6 def amount @amount end |
#anp ⇒ Object (readonly)
Returns the value of attribute anp.
6 7 8 |
# File 'lib/nfe_reader/product/fuel.rb', line 6 def anp @anp end |
#cide_aliquot ⇒ Object (readonly)
Returns the value of attribute cide_aliquot.
6 7 8 |
# File 'lib/nfe_reader/product/fuel.rb', line 6 def cide_aliquot @cide_aliquot end |
#cide_base ⇒ Object (readonly)
Returns the value of attribute cide_base.
6 7 8 |
# File 'lib/nfe_reader/product/fuel.rb', line 6 def cide_base @cide_base end |
#cide_value ⇒ Object (readonly)
Returns the value of attribute cide_value.
6 7 8 |
# File 'lib/nfe_reader/product/fuel.rb', line 6 def cide_value @cide_value end |
#codif ⇒ Object (readonly)
Returns the value of attribute codif.
6 7 8 |
# File 'lib/nfe_reader/product/fuel.rb', line 6 def codif @codif end |