Class: Hanikamu::Operation::GuardError
- Inherits:
-
Service::Error
- Object
- Service::Error
- Hanikamu::Operation::GuardError
- Defined in:
- lib/hanikamu/operation.rb
Instance Attribute Summary collapse
-
#guard ⇒ Object
readonly
Returns the value of attribute guard.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(guard) ⇒ GuardError
constructor
A new instance of GuardError.
Constructor Details
#initialize(guard) ⇒ GuardError
Returns a new instance of GuardError.
29 30 31 32 |
# File 'lib/hanikamu/operation.rb', line 29 def initialize(guard) @guard = guard super(guard.is_a?(String) ? guard : guard.errors..join(", ")) end |
Instance Attribute Details
#guard ⇒ Object (readonly)
Returns the value of attribute guard.
27 28 29 |
# File 'lib/hanikamu/operation.rb', line 27 def guard @guard end |
Instance Method Details
#errors ⇒ Object
34 35 36 37 38 |
# File 'lib/hanikamu/operation.rb', line 34 def errors return @guard if @guard.is_a?(String) @guard.errors end |