class method
self.wrap
Ruby on Rails 6.0.6
Since v5.2.8.1Signature
self.wrap()
Perform the work in the supplied block as an execution.
Source
# File activesupport/lib/active_support/execution_wrapper.rb, line 86
def self.wrap
return yield if active?
instance = run!
begin
yield
ensure
instance.complete!
end
end
Defined in activesupport/lib/active_support/execution_wrapper.rb line 86
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::ExecutionWrapper