Class: Cucover::Recording
- Inherits:
-
Struct
- Object
- Struct
- Cucover::Recording
- Defined in:
- lib/cucover/recording.rb
Defined Under Namespace
Classes: CoveredFile
Constant Summary collapse
- IGNORE_PATTERNS =
[ /gem/, /vendor/, /lib\/ruby/, /cucover\/lib/ ]
Instance Attribute Summary collapse
-
#additional_covered_files ⇒ Object
writeonly
Sets the attribute additional_covered_files.
-
#analyzer ⇒ Object
Returns the value of attribute analyzer.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#file_colon_line ⇒ Object
Returns the value of attribute file_colon_line.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
Instance Method Summary collapse
- #covered_files ⇒ Object
- #covers_file?(source_file) ⇒ Boolean
- #covers_line?(source_file, line_number) ⇒ Boolean
- #failed? ⇒ Boolean
- #feature_filename ⇒ Object
Instance Attribute Details
#additional_covered_files=(value) ⇒ Object
Sets the attribute additional_covered_files
2 3 4 |
# File 'lib/cucover/recording.rb', line 2 def additional_covered_files=(value) @additional_covered_files = value end |
#analyzer ⇒ Object
Returns the value of attribute analyzer
2 3 4 |
# File 'lib/cucover/recording.rb', line 2 def analyzer @analyzer end |
#end_time ⇒ Object
Returns the value of attribute end_time
2 3 4 |
# File 'lib/cucover/recording.rb', line 2 def end_time @end_time end |
#exception ⇒ Object
Returns the value of attribute exception
2 3 4 |
# File 'lib/cucover/recording.rb', line 2 def exception @exception end |
#file_colon_line ⇒ Object
Returns the value of attribute file_colon_line
2 3 4 |
# File 'lib/cucover/recording.rb', line 2 def file_colon_line @file_colon_line end |
#start_time ⇒ Object
Returns the value of attribute start_time
2 3 4 |
# File 'lib/cucover/recording.rb', line 2 def start_time @start_time end |
Instance Method Details
#covered_files ⇒ Object
28 29 30 |
# File 'lib/cucover/recording.rb', line 28 def covered_files @covered_files ||= analyzed_covered_files + additional_covered_files end |
#covers_file?(source_file) ⇒ Boolean
20 21 22 |
# File 'lib/cucover/recording.rb', line 20 def covers_file?(source_file) covered_files.include?(source_file) end |
#covers_line?(source_file, line_number) ⇒ Boolean
24 25 26 |
# File 'lib/cucover/recording.rb', line 24 def covers_line?(source_file, line_number) covered_files.detect{ |f| f.file == source_file }.covers_line?(line_number) end |
#failed? ⇒ Boolean
32 33 34 |
# File 'lib/cucover/recording.rb', line 32 def failed? !!exception end |
#feature_filename ⇒ Object
16 17 18 |
# File 'lib/cucover/recording.rb', line 16 def feature_filename file_colon_line.split(':').first end |