Class: Nfe::Reader::Fuel
- Inherits:
-
Object
- Object
- Nfe::Reader::Fuel
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/product/fuel.rb
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.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/nfe_reader/product/fuel.rb', line 9 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.
7 8 9 |
# File 'lib/nfe_reader/product/fuel.rb', line 7 def amount @amount end |
#anp ⇒ Object (readonly)
Returns the value of attribute anp.
7 8 9 |
# File 'lib/nfe_reader/product/fuel.rb', line 7 def anp @anp end |
#cide_aliquot ⇒ Object (readonly)
Returns the value of attribute cide_aliquot.
7 8 9 |
# File 'lib/nfe_reader/product/fuel.rb', line 7 def cide_aliquot @cide_aliquot end |
#cide_base ⇒ Object (readonly)
Returns the value of attribute cide_base.
7 8 9 |
# File 'lib/nfe_reader/product/fuel.rb', line 7 def cide_base @cide_base end |
#cide_value ⇒ Object (readonly)
Returns the value of attribute cide_value.
7 8 9 |
# File 'lib/nfe_reader/product/fuel.rb', line 7 def cide_value @cide_value end |
#codif ⇒ Object (readonly)
Returns the value of attribute codif.
7 8 9 |
# File 'lib/nfe_reader/product/fuel.rb', line 7 def codif @codif end |