Exception: Modulorails::InvalidFormatError
- Defined in:
- lib/modulorails/errors/invalid_format_error.rb
Overview
An exception representing an invalid format for a given field.
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#r field(field) ⇒ Object
The name of the field that had a wrong format.
Instance Method Summary collapse
-
#initialize(field) ⇒ InvalidFormatError
constructor
A new instance of InvalidFormatError.
Constructor Details
#initialize(field) ⇒ InvalidFormatError
Returns a new instance of InvalidFormatError.
9 10 11 12 13 |
# File 'lib/modulorails/errors/invalid_format_error.rb', line 9 def initialize(field) super(I18n.t('modulorails.errors.invalid_format', field: field)) @field = field end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
6 7 8 |
# File 'lib/modulorails/errors/invalid_format_error.rb', line 6 def field @field end |
#r field(field) ⇒ Object
The name of the field that had a wrong format.
6 |
# File 'lib/modulorails/errors/invalid_format_error.rb', line 6 attr_reader :field |