Class: DTAUS::CSatz

Inherits:
Satz
  • Object
show all
Defined in:
lib/dtaus/validator.rb

Instance Attribute Summary

Attributes inherited from Satz

#string

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Satz

#initialize, #satzart, #satzlaenge

Constructor Details

This class inherits a constructor from DTAUS::Satz

Class Method Details

.many(string) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/dtaus/validator.rb', line 43

def self.many(string)
  this = new(string)
  anzahl_erweiterungen = this.anzahl_erweiterungen.to_i

  if anzahl_erweiterungen < 3
    offset = 0
  else
    anzahl_bloecke = ((anzahl_erweiterungen - 2) / 2) + anzahl_erweiterungen % 2
    offset = anzahl_bloecke * 128
  end

  return [this] if string[255 + offset..-1].nil?
  return [this] + many(string[255 + offset..-1])

end

Instance Method Details

#anzahl_erweiterungenObject



131
132
133
# File 'lib/dtaus/validator.rb', line 131

def anzahl_erweiterungen
  @string[185..186]
end

#betragObject



99
100
101
# File 'lib/dtaus/validator.rb', line 99

def betrag
  @string[79..89]
end

#blz_absenderObject



91
92
93
# File 'lib/dtaus/validator.rb', line 91

def blz_absender
  @string[61..68]
end

#blz_empfaengerObject



63
64
65
# File 'lib/dtaus/validator.rb', line 63

def blz_empfaenger
  @string[13..20]
end

#blz_erstbeteiligte_bankObject



59
60
61
# File 'lib/dtaus/validator.rb', line 59

def blz_erstbeteiligte_bank
  @string[5..12]
end

#ergaenzungObject



79
80
81
# File 'lib/dtaus/validator.rb', line 79

def ergaenzung
  @string[46..48]
end

#interne_erweiterungenObject



135
136
137
# File 'lib/dtaus/validator.rb', line 135

def interne_erweiterungen
  @string[187..244]
end

#interne_kundennummerObject



71
72
73
# File 'lib/dtaus/validator.rb', line 71

def interne_kundennummer
  @string[31..43]
end

#konto_absenderObject



95
96
97
# File 'lib/dtaus/validator.rb', line 95

def konto_absender
  @string[69..78]
end

#konto_empfaengerObject



67
68
69
# File 'lib/dtaus/validator.rb', line 67

def konto_empfaenger
  @string[21..30]
end

#leerzeichen1Object



83
84
85
# File 'lib/dtaus/validator.rb', line 83

def leerzeichen1
  @string[49..50]
end

#leerzeichen2Object



103
104
105
# File 'lib/dtaus/validator.rb', line 103

def leerzeichen2
  @string[90..92]
end

#leerzeichen3Object



111
112
113
# File 'lib/dtaus/validator.rb', line 111

def leerzeichen3
  @string[120..127]
end

#leerzeichen4Object



127
128
129
# File 'lib/dtaus/validator.rb', line 127

def leerzeichen4
  @string[183..184]
end

#leerzeichen5Object



139
140
141
# File 'lib/dtaus/validator.rb', line 139

def leerzeichen5
  @string[245..255]
end

#name_absenderObject



115
116
117
# File 'lib/dtaus/validator.rb', line 115

def name_absender
  @string[128..154]
end

#name_empfaengerObject



107
108
109
# File 'lib/dtaus/validator.rb', line 107

def name_empfaenger
  @string[93..119]
end

#nullenObject



87
88
89
# File 'lib/dtaus/validator.rb', line 87

def nullen
  @string[50..60]
end

#textschluesselObject



75
76
77
# File 'lib/dtaus/validator.rb', line 75

def textschluessel
  @string[44..45]
end

#verwendungszweckObject



119
120
121
# File 'lib/dtaus/validator.rb', line 119

def verwendungszweck
  @string[155..181]
end

#waehrungObject



123
124
125
# File 'lib/dtaus/validator.rb', line 123

def waehrung
  @string[182..182]
end