caller_locations

caller_locations(start=1, length=nil) â array or nil
caller_locations(range) â array or nil
Instance Public methods

Returns the current execution stackâan array containing backtrace location objects.

See Thread::Backtrace::Location for more information.

The optional start parameter determines the number of initial stack entries to omit from the top of the stack.

A second optional length parameter can be used to limit how many entries are returned from the stack.

Returns nil if start is greater than the size of current execution stack.

Optionally you can pass a range, which will return an array containing the entries within the specified range.

doc_ruby_on_rails
2015-04-17 09:34:56
Comments
Leave a Comment

Please login to continue.