Class: RSpec::Signal::Backtrace::Frame
- Inherits:
-
Struct
- Object
- Struct
- RSpec::Signal::Backtrace::Frame
- Defined in:
- lib/rspec/signal/backtrace/frame.rb,
lib/rspec/signal/backtrace/reducer.rb
Overview
Frames and gaps are rendered side by side, so both answer frame?.
Instance Attribute Summary collapse
-
#display_path ⇒ Object
Returns the value of attribute display_path.
-
#gem_name ⇒ Object
Returns the value of attribute gem_name.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#label ⇒ Object
Returns the value of attribute label.
-
#line ⇒ Object
Returns the value of attribute line.
-
#path ⇒ Object
Returns the value of attribute path.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
- #external? ⇒ Boolean
- #frame? ⇒ Boolean
- #framework? ⇒ Boolean
- #location ⇒ Object
- #project? ⇒ Boolean
- #to_h ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#display_path ⇒ Object
Returns the value of attribute display_path
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def display_path @display_path end |
#gem_name ⇒ Object
Returns the value of attribute gem_name
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def gem_name @gem_name end |
#kind ⇒ Object
Returns the value of attribute kind
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def kind @kind end |
#label ⇒ Object
Returns the value of attribute label
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def label @label end |
#line ⇒ Object
Returns the value of attribute line
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def line @line end |
#path ⇒ Object
Returns the value of attribute path
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def path @path end |
#raw ⇒ Object
Returns the value of attribute raw
12 13 14 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 12 def raw @raw end |
Instance Method Details
#external? ⇒ Boolean
17 18 19 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 17 def external? kind == :external end |
#frame? ⇒ Boolean
26 27 28 |
# File 'lib/rspec/signal/backtrace/reducer.rb', line 26 def frame? true end |
#framework? ⇒ Boolean
21 22 23 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 21 def framework? kind == :framework end |
#location ⇒ Object
25 26 27 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 25 def location line ? "#{display_path}:#{line}" : display_path end |
#project? ⇒ Boolean
13 14 15 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 13 def project? kind == :project end |
#to_h ⇒ Object
33 34 35 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 33 def to_h { location: location, label: label, kind: kind.to_s, gem: gem_name }.compact end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/rspec/signal/backtrace/frame.rb', line 29 def to_s label && !label.empty? ? "#{location} in `#{label}'" : location end |