Class: Cucover::CliCommands::ShowRecordings
- Inherits:
-
Object
- Object
- Cucover::CliCommands::ShowRecordings
- Defined in:
- lib/cucover/cli_commands/show_recordings.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(cli_args) ⇒ ShowRecordings
constructor
A new instance of ShowRecordings.
- #recordings ⇒ Object
Constructor Details
#initialize(cli_args) ⇒ ShowRecordings
Returns a new instance of ShowRecordings.
4 5 6 |
# File 'lib/cucover/cli_commands/show_recordings.rb', line 4 def initialize(cli_args) @store = Store.new end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/cucover/cli_commands/show_recordings.rb', line 8 def execute unless recordings.any? puts "No recordings to show. Run some tests with cucover first." return end recordings.each do |recording| puts puts "#{recording.file_colon_line}" # (#{recording.start_time.strftime('%Y-%m-%d %H:%M:%S')}) recording.covered_files.each do |covered_file| puts " #{covered_file.to_s}" end end puts end |
#recordings ⇒ Object
24 25 26 |
# File 'lib/cucover/cli_commands/show_recordings.rb', line 24 def recordings @recordings ||= @store.latest_recordings.sort{ |x, y| x.file_colon_line <=> y.file_colon_line } end |