Class: Avmtrf1::InventarioSistemas::Parser::HeaderColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/inventario_sistemas/parser/header_column.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_id(main, sub) ⇒ Object


10
11
12
# File 'lib/avmtrf1/inventario_sistemas/parser/header_column.rb', line 10

def build_id(main, sub)
  "#{main}_#{sub || 'nil'}".downcase.parameterize
end

Instance Method Details

#idObject


17
18
19
# File 'lib/avmtrf1/inventario_sistemas/parser/header_column.rb', line 17

def id
  self.class.build_id(main, sub)
end

#keyObject


21
22
23
# File 'lib/avmtrf1/inventario_sistemas/parser/header_column.rb', line 21

def key
  main + sub.if_present('') { |v| "/#{v}" }
end