Class: Judopay::FieldError
- Inherits:
-
Object
- Object
- Judopay::FieldError
- Defined in:
- lib/judopay/error.rb
Overview
Single field error model
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#field_name ⇒ Object
Returns the value of attribute field_name.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, code, field_name, detail) ⇒ FieldError
constructor
A new instance of FieldError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, code, field_name, detail) ⇒ FieldError
Returns a new instance of FieldError.
8 9 10 11 12 13 |
# File 'lib/judopay/error.rb', line 8 def initialize(, code, field_name, detail) @detail = detail @field_name = field_name @code = code @message = end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
6 7 8 |
# File 'lib/judopay/error.rb', line 6 def code @code end |
#detail ⇒ Object
Returns the value of attribute detail.
6 7 8 |
# File 'lib/judopay/error.rb', line 6 def detail @detail end |
#field_name ⇒ Object
Returns the value of attribute field_name.
6 7 8 |
# File 'lib/judopay/error.rb', line 6 def field_name @field_name end |
#message ⇒ Object
Returns the value of attribute message.
6 7 8 |
# File 'lib/judopay/error.rb', line 6 def @message end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/judopay/error.rb', line 15 def to_s "Field \"#{@field_name}\" (code #{@code}): #{@message}" end |