Class: NfeReader::Carrier
- Inherits:
-
Object
- Object
- NfeReader::Carrier
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/carrier.rb
Constant Summary
Constants included from AttributeHelper
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.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#state_registration ⇒ Object
readonly
Returns the value of attribute state_registration.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Carrier
constructor
A new instance of Carrier.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Carrier
Returns a new instance of Carrier.
8 9 10 11 12 13 14 15 16 |
# File 'lib/nfe_reader/carrier.rb', line 8 def initialize(attrs = {}) @cnpj = attrs[:CNPJ] @cpf = attrs[:CPF] @name = attrs[:xNome] @state_registration = attrs[:IE] @address = attrs[:xEnder] @city = attrs[:xMun] @state = attrs[:UF] end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def address @address end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def city @city end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def cnpj @cnpj end |
#cpf ⇒ Object (readonly)
Returns the value of attribute cpf.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def cpf @cpf end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def state @state end |
#state_registration ⇒ Object (readonly)
Returns the value of attribute state_registration.
6 7 8 |
# File 'lib/nfe_reader/carrier.rb', line 6 def state_registration @state_registration end |