Module: Hanami::Interactor
- Defined in:
- gems/gems/hanami-utils-1.3.3/lib/hanami/interactor.rb,
gems/gems/hanami-utils-1.3.8/lib/hanami/interactor.rb
Overview
Hanami Interactor
Defined Under Namespace
Modules: Interface, LegacyInterface Classes: Result
Instance Method Summary collapse
-
#error(message) ⇒ Object
private
Logs an error without interrupting the flow.
-
#error!(message) ⇒ Object
private
Logs an error and interrupts the flow.
-
#fail! ⇒ Object
private
Fails and interrupts the current flow.
-
#valid? ⇒ TrueClass, FalseClass
private
Checks if proceed with
#call
invocation.
Instance Method Details
#error(message) ⇒ Object (private)
Logs an error without interrupting the flow.
When used, the returned result won’t be successful.
Source: | on GitHub
def error() @__result.add_error false end |
#error!(message) ⇒ Object (private)
Logs an error and interrupts the flow.
When used, the returned result won’t be successful.
Source: | on GitHub
def error!() error() fail! end |
#fail! ⇒ Object (private)
Fails and interrupts the current flow.
Source: | on GitHub
def fail! @__result.fail! throw :fail end |
#valid? ⇒ TrueClass, FalseClass (private)
Checks if proceed with #call
invocation. By default it returns true
.
Developers can override it.
Source: | on GitHub
def valid?(*) true end |