Class: Nfe::Reader::Armament

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributeHelper

#attributes, #attributes_to_hash

Constructor Details

#initialize(attrs = {}) ⇒ Armament

Fields Values

tpArma : 0 - Uso permitido;

1 - Uso restrito;


14
15
16
17
18
19
20
21
22
23
# File 'lib/nfe_reader/product/armament.rb', line 14

def initialize(attrs = {})
  # Tipo de Arma
  @kind = attrs[:tpArma]
  # Serie
  @serie = attrs[:nSerie]
  # Cano
  @barrel = attrs[:nCano]
  # Descricao
  @description = attrs[:descr]
end

Instance Attribute Details

#barrelObject (readonly)

Returns the value of attribute barrel.



7
8
9
# File 'lib/nfe_reader/product/armament.rb', line 7

def barrel
  @barrel
end

#descriptionObject (readonly)

Returns the value of attribute description.



7
8
9
# File 'lib/nfe_reader/product/armament.rb', line 7

def description
  @description
end

#kindObject (readonly)

Returns the value of attribute kind.



7
8
9
# File 'lib/nfe_reader/product/armament.rb', line 7

def kind
  @kind
end

#serieObject (readonly)

Returns the value of attribute serie.



7
8
9
# File 'lib/nfe_reader/product/armament.rb', line 7

def serie
  @serie
end