Class: Nfe::Reader::Purchase

Inherits:
Object
  • Object
show all
Includes:
AttributeHelper
Defined in:
lib/nfe_reader/purchase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contractObject (readonly)

Returns the value of attribute contract.



9
10
11
# File 'lib/nfe_reader/purchase.rb', line 9

def contract
  @contract
end

#demandObject (readonly)

Returns the value of attribute demand.



9
10
11
# File 'lib/nfe_reader/purchase.rb', line 9

def demand
  @demand
end

#numberObject (readonly)

Returns the value of attribute number.



9
10
11
# File 'lib/nfe_reader/purchase.rb', line 9

def number
  @number
end