Class: Nfe::Carrier
- Inherits:
-
Object
- Object
- Nfe::Carrier
- Defined in:
- lib/nfe_reader/carrier.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#cnpj ⇒ Object
readonly
Returns the value of attribute cnpj.
-
#cpf ⇒ Object
readonly
Returns the value of attribute cpf.
-
#ie ⇒ Object
readonly
Returns the value of attribute ie.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Carrier
constructor
A new instance of Carrier.
Constructor Details
#initialize(attrs = {}) ⇒ Carrier
Returns a new instance of Carrier.
6 7 8 9 10 11 12 13 14 |
# File 'lib/nfe_reader/carrier.rb', line 6 def initialize(attrs = {}) @cnpj = attrs[:CNPJ] @cpf = attrs[:CPF] @name = attrs[:xNome] @ie = attrs[:IE] @address = attrs[:xEnder] @city = attrs[:xMun] @state = attrs[:UF] end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def address @address end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def city @city end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def cnpj @cnpj end |
#cpf ⇒ Object (readonly)
Returns the value of attribute cpf.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def cpf @cpf end |
#ie ⇒ Object (readonly)
Returns the value of attribute ie.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def ie @ie end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'lib/nfe_reader/carrier.rb', line 4 def state @state end |