Class: NfeReader::Medicament
- Inherits:
-
Object
- Object
- NfeReader::Medicament
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/product/medicament.rb
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#ceiling_price ⇒ Object
readonly
Returns the value of attribute ceiling_price.
-
#fabrication ⇒ Object
readonly
Returns the value of attribute fabrication.
-
#lot_amount ⇒ Object
readonly
Returns the value of attribute lot_amount.
-
#lot_number ⇒ Object
readonly
Returns the value of attribute lot_number.
-
#validity ⇒ Object
readonly
Returns the value of attribute validity.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Medicament
constructor
A new instance of Medicament.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Medicament
Returns a new instance of Medicament.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/nfe_reader/product/medicament.rb', line 8 def initialize(attrs = {}) # Numero de Lote @lot_number = attrs[:nLote] # Quantidade de Lotes @lot_amount = attrs[:qLote] # Data de Fabricação @fabrication = attrs[:dFab] # Data de Validade @validity = attrs[:dVal] # Preço maximo venda para Consumidor Final @ceiling_price = attrs[:vPMC] end |
Instance Attribute Details
#ceiling_price ⇒ Object (readonly)
Returns the value of attribute ceiling_price.
6 7 8 |
# File 'lib/nfe_reader/product/medicament.rb', line 6 def ceiling_price @ceiling_price end |
#fabrication ⇒ Object (readonly)
Returns the value of attribute fabrication.
6 7 8 |
# File 'lib/nfe_reader/product/medicament.rb', line 6 def fabrication @fabrication end |
#lot_amount ⇒ Object (readonly)
Returns the value of attribute lot_amount.
6 7 8 |
# File 'lib/nfe_reader/product/medicament.rb', line 6 def lot_amount @lot_amount end |
#lot_number ⇒ Object (readonly)
Returns the value of attribute lot_number.
6 7 8 |
# File 'lib/nfe_reader/product/medicament.rb', line 6 def lot_number @lot_number end |
#validity ⇒ Object (readonly)
Returns the value of attribute validity.
6 7 8 |
# File 'lib/nfe_reader/product/medicament.rb', line 6 def validity @validity end |