Class: RShade::Stack
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config: nil, registry: ::RShade::Config::Registry.instance) ⇒ Stack
constructor
A new instance of Stack.
- #trace ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/rshade/stack.rb', line 5 def config @config end |
Class Method Details
.trace(config: nil) ⇒ Object
11 12 13 |
# File 'lib/rshade/stack.rb', line 11 def self.trace(config: nil) new(config: config).trace end |
Instance Method Details
#trace ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rshade/stack.rb', line 15 def trace config.exclude_gems! result = binding.callers.drop(2).map do |bind| frame = StackFrame.from_binding(bind) next nil unless config.filter.call(frame) frame end.compact.reverse config.formatter.call(result, variable_serializer: config.variable_serializer) end |