Class: NfeReader::Purchase
- Inherits:
-
Object
- Object
- NfeReader::Purchase
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/purchase.rb
Overview
Informações de Compras
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#contract ⇒ Object
readonly
Returns the value of attribute contract.
-
#demand ⇒ Object
readonly
Returns the value of attribute demand.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Purchase
constructor
A new instance of Purchase.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Purchase
Returns a new instance of Purchase.
9 10 11 12 13 |
# File 'lib/nfe_reader/purchase.rb', line 9 def initialize(attrs = {}) @number = attrs[:xNEmp] @demand = attrs[:xPed] @contract = attrs[:xCont] end |
Instance Attribute Details
#contract ⇒ Object (readonly)
Returns the value of attribute contract.
7 8 9 |
# File 'lib/nfe_reader/purchase.rb', line 7 def contract @contract end |
#demand ⇒ Object (readonly)
Returns the value of attribute demand.
7 8 9 |
# File 'lib/nfe_reader/purchase.rb', line 7 def demand @demand end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
7 8 9 |
# File 'lib/nfe_reader/purchase.rb', line 7 def number @number end |