Sha256: 19a987b77c046f7176d90904cf548a522c46c8b15567c853a6dcaa96a4e8e7ff
Contents?: true
Size: 990 Bytes
Versions: 53
Compression:
Stored size: 990 Bytes
Contents
module Plutonium module Interaction module Response # Represents a null response, which doesn't perform any specific action. # # This class is used when an interaction doesn't produce a specific response # type but still needs to wrap a result value. class Null < Base # @return [Object] The result value wrapped by this null response. attr_reader :result # Initializes a new Null response. # # @param result [Object] The result value to be wrapped. def initialize(result) super() @result = result end private # Executes the null response by yielding the result value. # # @param controller [ActionController::Base] The controller instance (unused). # @yield [Object] The result value wrapped by this response. # @return [void] def execute(controller, &) yield @result end end end end end
Version data entries
53 entries across 53 versions & 1 rubygems