Class: RSpec::Signal::Backtrace::Gap

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/signal/backtrace/reducer.rb

Overview

A gap standing in for frames that were dropped.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



9
10
11
# File 'lib/rspec/signal/backtrace/reducer.rb', line 9

def count
  @count
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



9
10
11
# File 'lib/rspec/signal/backtrace/reducer.rb', line 9

def kind
  @kind
end

Instance Method Details

#frame?Boolean

Returns:

  • (Boolean)


10
# File 'lib/rspec/signal/backtrace/reducer.rb', line 10

def frame? = false

#to_hObject



17
# File 'lib/rspec/signal/backtrace/reducer.rb', line 17

def to_h = { omitted: count, kind: kind.to_s }

#to_sObject



12
13
14
15
# File 'lib/rspec/signal/backtrace/reducer.rb', line 12

def to_s
  noun = kind == :framework ? "framework/runtime" : "library"
  "[#{count} #{noun} frame#{"s" unless count == 1} omitted]"
end