Class: SixthSense::Model::TestCase
- Inherits:
-
Struct
- Object
- Struct
- SixthSense::Model::TestCase
- Defined in:
- lib/sixth_sense/model.rb
Instance Attribute Summary collapse
-
#assertions ⇒ Object
Returns the value of attribute assertions.
-
#ast ⇒ Object
Returns the value of attribute ast.
-
#body ⇒ Object
Returns the value of attribute body.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
Instance Attribute Details
#assertions ⇒ Object
Returns the value of attribute assertions
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def assertions @assertions end |
#ast ⇒ Object
Returns the value of attribute ast
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def ast @ast end |
#body ⇒ Object
Returns the value of attribute body
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def body @body end |
#description ⇒ Object
Returns the value of attribute description
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def description @description end |
#id ⇒ Object
Returns the value of attribute id
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def id @id end |
#location ⇒ Object
Returns the value of attribute location
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def location @location end |
#metadata ⇒ Object
Returns the value of attribute metadata
36 37 38 |
# File 'lib/sixth_sense/model.rb', line 36 def @metadata end |
Instance Method Details
#executable_loc ⇒ Object
46 47 48 |
# File 'lib/sixth_sense/model.rb', line 46 def executable_loc body.to_s.lines.count { |line| line.match?(/\S/) } end |
#to_h ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/sixth_sense/model.rb', line 50 def to_h { id: id, description: description, location: location&.to_h, assertions: assertions.map(&:to_h), metadata: } end |