lib/hanami/interactor.rb in hanami-utils-1.3.5 vs lib/hanami/interactor.rb in hanami-utils-1.3.6

- old
+ new

@@ -38,11 +38,11 @@ @payload = payload @errors = [] @success = true end - # Check if the current status is successful + # Checks if the current status is successful # # @return [TrueClass,FalseClass] the result of the check # # @since 0.8.1 def successful? @@ -50,20 +50,20 @@ end # @since 0.3.5 alias success? successful? - # Check if the current status is not successful + # Checks if the current status is not successful # # @return [TrueClass,FalseClass] the result of the check # # @since 0.9.2 def failure? !successful? end - # Force the status to be a failure + # Forces the status to be a failure # # @since 0.3.5 def fail! @success = false end @@ -102,11 +102,11 @@ # @see Hanami::Interactor#error! def error errors.first end - # Prepare the result before to be returned + # Prepares the result before to be returned # # @param payload [Hash] an updated payload # # @since 0.3.5 # @api private @@ -375,11 +375,11 @@ end end private - # Check if proceed with <tt>#call</tt> invokation. + # Checks if proceed with <tt>#call</tt> invocation. # By default it returns <tt>true</tt>. # # Developers can override it. # # @return [TrueClass,FalseClass] the result of the check @@ -387,11 +387,11 @@ # @since 0.3.5 def valid?(*) true end - # Fail and interrupt the current flow. + # Fails and interrupts the current flow. # # @since 0.3.5 # # @example # require 'hanami/interactor' @@ -426,11 +426,11 @@ def fail! @__result.fail! throw :fail end - # Log an error without interrupting the flow. + # Logs an error without interrupting the flow. # # When used, the returned result won't be successful. # # @param message [String] the error message # @@ -481,11 +481,11 @@ def error(message) @__result.add_error message false end - # Log an error AND interrupting the flow. + # Logs an error and interrupts the flow. # # When used, the returned result won't be successful. # # @param message [String] the error message # @@ -577,19 +577,19 @@ else prepend Hanami::Interactor::Interface end end - # Expose local instance variables into the returning value of <tt>#call</tt> + # Exposes local instance variables into the returning value of <tt>#call</tt> # # @param instance_variable_names [Symbol,Array<Symbol>] one or more instance # variable names # # @since 0.5.0 # # @see Hanami::Interactor::Result # - # @example Expose instance variable + # @example Exposes instance variable # # class Signup # include Hanami::Interactor # expose :user #