Class: Chat::Service::Base::Context
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Chat::Service::Base::Context
- Defined in:
- plugins/chat/app/services/base.rb
Overview
Simple structure to hold the context of the service during its whole lifecycle.
Instance Method Summary collapse
-
#fail(context = {}) ⇒ Context
Marks the context as failed without raising an exception.
-
#fail!(context = {}) ⇒ Context
Marks the context as failed.
-
#failure? ⇒ Boolean
Returns
true
if the context is set as failed. -
#success? ⇒ Boolean
Returns
true
if the context is set as successful (default).
Instance Method Details
#fail(context = {}) ⇒ Context
Marks the context as failed without raising an exception.
#fail!(context = {}) ⇒ Context
Marks the context as failed.
#failure? ⇒ Boolean
Returns true
if the context is set as failed
#success? ⇒ Boolean
Returns true
if the context is set as successful (default)