Class: DTAUS::Validator

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Validator

Returns a new instance of Validator.



9
10
11
# File 'lib/dtaus/validator.rb', line 9

def initialize(string)
  @string = string
end

Instance Attribute Details

#stringObject (readonly)

Returns the value of attribute string.



3
4
5
# File 'lib/dtaus/validator.rb', line 3

def string
  @string
end

Class Method Details

.load(filename) ⇒ Object



5
6
7
# File 'lib/dtaus/validator.rb', line 5

def self.load(filename)
  new(File.open(filename).read)
end

Instance Method Details

#a_satzObject



13
14
15
# File 'lib/dtaus/validator.rb', line 13

def a_satz
  @a_satz = ASatz.new(@string[0..127])
end

#c_saetzeObject



21
22
23
# File 'lib/dtaus/validator.rb', line 21

def c_saetze
  @c_saetze = CSatz.many(@string[128..-129])
end

#e_satzObject



17
18
19
# File 'lib/dtaus/validator.rb', line 17

def e_satz
  @e_satz = ESatz.new(@string[-128..-1])
end