Class: FixedWidthFileValidator::FieldValidationError
- Inherits:
-
Object
- Object
- FixedWidthFileValidator::FieldValidationError
- Defined in:
- lib/fixed_width_file_validator/validator.rb
Instance Attribute Summary collapse
-
#failed_field ⇒ Object
readonly
Returns the value of attribute failed_field.
-
#failed_validation ⇒ Object
readonly
Returns the value of attribute failed_validation.
-
#failed_value ⇒ Object
readonly
Returns the value of attribute failed_value.
-
#line_num ⇒ Object
readonly
Returns the value of attribute line_num.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(validation, record, field_name, pos, width) ⇒ FieldValidationError
constructor
A new instance of FieldValidationError.
Constructor Details
#initialize(validation, record, field_name, pos, width) ⇒ FieldValidationError
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fixed_width_file_validator/validator.rb', line 7 def initialize(validation, record, field_name, pos, width) @raw = record[:_raw] @line_num = record[:_line_num] @record = record @failed_field = field_name @failed_validation = validation @failed_value = record[field_name] @pos = pos @width = width end |
Instance Attribute Details
#failed_field ⇒ Object (readonly)
Returns the value of attribute failed_field.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def failed_field @failed_field end |
#failed_validation ⇒ Object (readonly)
Returns the value of attribute failed_validation.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def failed_validation @failed_validation end |
#failed_value ⇒ Object (readonly)
Returns the value of attribute failed_value.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def failed_value @failed_value end |
#line_num ⇒ Object (readonly)
Returns the value of attribute line_num.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def line_num @line_num end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def pos @pos end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def raw @raw end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def record @record end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
5 6 7 |
# File 'lib/fixed_width_file_validator/validator.rb', line 5 def width @width end |