Class: InformantRails::FieldError
- Inherits:
-
Object
- Object
- InformantRails::FieldError
- Defined in:
- lib/informant-rails/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.
5 6 7 8 9 |
# File 'lib/informant-rails/field_error.rb', line 5 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-rails/field_error.rb', line 3 def end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/informant-rails/field_error.rb', line 3 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/informant-rails/field_error.rb', line 3 def value @value end |
Instance Method Details
#as_json(*args) ⇒ Object
15 16 17 |
# File 'lib/informant-rails/field_error.rb', line 15 def as_json(*args) { name: name, value: value, message: } end |