Class: DTAUS::Validator
- Inherits:
-
Object
- Object
- DTAUS::Validator
- Defined in:
- lib/dtaus/validator.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Class Method Summary collapse
Instance Method Summary collapse
- #a_satz ⇒ Object
- #c_saetze ⇒ Object
- #e_satz ⇒ Object
-
#initialize(string) ⇒ Validator
constructor
A new instance of Validator.
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
#string ⇒ Object (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_satz ⇒ Object
13 14 15 |
# File 'lib/dtaus/validator.rb', line 13 def a_satz @a_satz = ASatz.new(@string[0..127]) end |
#c_saetze ⇒ Object
21 22 23 |
# File 'lib/dtaus/validator.rb', line 21 def c_saetze @c_saetze = CSatz.many(@string[128..-129]) end |
#e_satz ⇒ Object
17 18 19 |
# File 'lib/dtaus/validator.rb', line 17 def e_satz @e_satz = ESatz.new(@string[-128..-1]) end |