Class: Datev::Header

Inherits:
Base
  • Object
show all
Defined in:
lib/datev/header.rb

Constant Summary collapse

DEFAULT_ATTRIBUTES =
{
  'DATEV-Format-KZ' => 'EXTF',
  'Versionsnummer'  => 510,
  'Datenkategorie'  => 21,
  'Formatname'      => 'Buchungsstapel',
  'Formatversion'   => 7,
  'Erzeugt am'      => Time.now.utc,
  'Sachkontenlänge' => 4,
  'Bezeichnung'     => 'Buchungen',
  'Buchungstyp'     => 1,
  'WKZ'             => 'EUR'
}

Instance Attribute Summary

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

#[], field, field_by_name, #output

Constructor Details

#initialize(attributes = {}) ⇒ Header

Returns a new instance of Header.

Raises:

  • (ArgumentError)


18
19
20
21
# File 'lib/datev/header.rb', line 18

def initialize(attributes={})
  raise ArgumentError.new('Hash required') unless attributes.is_a?(Hash)
  super DEFAULT_ATTRIBUTES.merge(attributes)
end