class Paco::Callstack
Attributes
stack[R]
Public Class Methods
new()
click to toggle source
# File lib/paco/callstack.rb, line 7 def initialize @stack = [] @depth = 0 end
Public Instance Methods
failure(**params)
click to toggle source
# File lib/paco/callstack.rb, line 12 def failure(**params) @depth -= 1 @stack << params.merge(status: :failure, depth: @depth) end
start(**params)
click to toggle source
# File lib/paco/callstack.rb, line 17 def start(**params) @depth += 1 @stack << params.merge(status: :start, depth: @depth) end
success(**params)
click to toggle source
# File lib/paco/callstack.rb, line 22 def success(**params) @depth -= 1 @stack << params.merge(status: :success, depth: @depth) end