Class: Nfe::Reader::Carrier
- Inherits:
-
Object
- Object
- Nfe::Reader::Carrier
- Includes:
- AttributeHelper
- 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.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Carrier
Returns a new instance of Carrier.
9 10 11 12 13 14 15 16 17 |
# File 'lib/nfe_reader/carrier.rb', line 9 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.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def address @address end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def city @city end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def cnpj @cnpj end |
#cpf ⇒ Object (readonly)
Returns the value of attribute cpf.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def cpf @cpf end |
#ie ⇒ Object (readonly)
Returns the value of attribute ie.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def ie @ie end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'lib/nfe_reader/carrier.rb', line 7 def state @state end |