Class: Nfe::Reader::Purchase
- Inherits:
-
Object
- Object
- Nfe::Reader::Purchase
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/purchase.rb
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.
11 12 13 14 15 |
# File 'lib/nfe_reader/purchase.rb', line 11 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.
9 10 11 |
# File 'lib/nfe_reader/purchase.rb', line 9 def contract @contract end |
#demand ⇒ Object (readonly)
Returns the value of attribute demand.
9 10 11 |
# File 'lib/nfe_reader/purchase.rb', line 9 def demand @demand end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
9 10 11 |
# File 'lib/nfe_reader/purchase.rb', line 9 def number @number end |