Exception: WebFlow::PluginInterruptionError

Inherits:
WebFlowError
  • Object
show all
Defined in:
lib/webflow/exceptions.rb

Overview

This error class allows plugins to interrupt a flow execution and substitute it’s execution result by a given Proc object.

Example…

my_block = proc { render 'test' }
raise( PluginInterruptionError.new( my_block ), "Plugin Interruption..." )

In this example, the flow execution chain would be halted and the block passed as a contructor argument would be executed. The Proc code will be executed on the current controller object instance via Ruby’s instance_eval mechanism.

Instance Method Summary collapse

Instance Method Details

#blockObject

Getter method to obtain the Proc object associated to this PluginInterruptionError instance.



67
68
69
# File 'lib/webflow/exceptions.rb', line 67

def block
  @_block
end