Class: InformantCommon::FieldError
- Inherits:
-
Object
- Object
- InformantCommon::FieldError
- Defined in:
- lib/informant-common/field_error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(name, value, message = nil) ⇒ FieldError
constructor
A new instance of FieldError.
Constructor Details
#initialize(name, value, message = nil) ⇒ FieldError
Returns a new instance of FieldError.
6 7 8 9 10 |
# File 'lib/informant-common/field_error.rb', line 6 def initialize(name, value, = nil) self.name = name self.value = value self. = end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/informant-common/field_error.rb', line 3 def end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/informant-common/field_error.rb', line 3 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/informant-common/field_error.rb', line 4 def value @value end |
Instance Method Details
#as_json(*_args) ⇒ Object
16 17 18 |
# File 'lib/informant-common/field_error.rb', line 16 def as_json(*_args) { name: name, value: value, message: } end |