Class: RSpec::Covers::ExampleResult
- Inherits:
-
Struct
- Object
- Struct
- RSpec::Covers::ExampleResult
- Defined in:
- lib/rspec/covers/reporter.rb
Instance Attribute Summary collapse
-
#call_log ⇒ Object
Returns the value of attribute call_log.
-
#declaration ⇒ Object
Returns the value of attribute declaration.
-
#declaration_validation ⇒ Object
Returns the value of attribute declaration_validation.
-
#description ⇒ Object
Returns the value of attribute description.
-
#example ⇒ Object
Returns the value of attribute example.
-
#executed_locations ⇒ Object
Returns the value of attribute executed_locations.
-
#file ⇒ Object
Returns the value of attribute file.
-
#id ⇒ Object
Returns the value of attribute id.
-
#line ⇒ Object
Returns the value of attribute line.
-
#measured_locations ⇒ Object
Returns the value of attribute measured_locations.
-
#suggestions ⇒ Object
Returns the value of attribute suggestions.
-
#unchecked_locations ⇒ Object
Returns the value of attribute unchecked_locations.
-
#verdict ⇒ Object
Returns the value of attribute verdict.
Instance Method Summary collapse
Instance Attribute Details
#call_log ⇒ Object
Returns the value of attribute call_log
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def call_log @call_log end |
#declaration ⇒ Object
Returns the value of attribute declaration
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def declaration @declaration end |
#declaration_validation ⇒ Object
Returns the value of attribute declaration_validation
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def declaration_validation @declaration_validation end |
#description ⇒ Object
Returns the value of attribute description
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def description @description end |
#example ⇒ Object
Returns the value of attribute example
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def example @example end |
#executed_locations ⇒ Object
Returns the value of attribute executed_locations
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def executed_locations @executed_locations end |
#file ⇒ Object
Returns the value of attribute file
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def file @file end |
#id ⇒ Object
Returns the value of attribute id
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def id @id end |
#line ⇒ Object
Returns the value of attribute line
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def line @line end |
#measured_locations ⇒ Object
Returns the value of attribute measured_locations
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def measured_locations @measured_locations end |
#suggestions ⇒ Object
Returns the value of attribute suggestions
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def suggestions @suggestions end |
#unchecked_locations ⇒ Object
Returns the value of attribute unchecked_locations
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def unchecked_locations @unchecked_locations end |
#verdict ⇒ Object
Returns the value of attribute verdict
13 14 15 |
# File 'lib/rspec/covers/reporter.rb', line 13 def verdict @verdict end |
Instance Method Details
#risky? ⇒ Boolean
29 30 31 |
# File 'lib/rspec/covers/reporter.rb', line 29 def risky? verdict.risky? end |
#to_h ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/rspec/covers/reporter.rb', line 33 def to_h { id: id, file: file, line: line, description: description, verdict: verdict.to_h, suggestions: suggestions.map(&:to_h), declaration_validation: declaration_validation&.to_h, measured_locations: Array(measured_locations).map(&:to_h), unchecked_locations: Array(unchecked_locations).map(&:to_h), declaration: { covers: declaration.covers.map(&:to_h), uses: declaration.uses.map(&:to_h), unresolved: declaration.unresolved.map(&:to_s) } } end |