Class: Hanikamu::Operation::FormError
- Inherits:
-
Service::Error
- Object
- Service::Error
- Hanikamu::Operation::FormError
- Defined in:
- lib/hanikamu/operation.rb
Overview
Error classes
Instance Attribute Summary collapse
-
#form ⇒ Object
readonly
Returns the value of attribute form.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(form) ⇒ FormError
constructor
A new instance of FormError.
Constructor Details
#initialize(form) ⇒ FormError
Returns a new instance of FormError.
14 15 16 17 |
# File 'lib/hanikamu/operation.rb', line 14 def initialize(form) @form = form super(form.is_a?(String) ? form : form.errors..join(", ")) end |
Instance Attribute Details
#form ⇒ Object (readonly)
Returns the value of attribute form.
12 13 14 |
# File 'lib/hanikamu/operation.rb', line 12 def form @form end |
Instance Method Details
#errors ⇒ Object
19 20 21 22 23 |
# File 'lib/hanikamu/operation.rb', line 19 def errors return @form if @form.is_a?(String) @form.errors end |