Class: Mutant::CLI::Command::Session::SessionCommand Private

Inherits:
Mutant::CLI::Command::Session show all
Defined in:
lib/mutant/cli/command/session.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Shared base for commands that operate on a session

API:

  • private

Direct Known Subclasses

Show, Subject

Constant Summary collapse

OPTIONS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

API:

  • private

i[add_session_id_option].freeze

Constants inherited from Mutant::CLI::Command::Session

NAME, RESULTS_DIR, SHORT_DESCRIPTION

Constants inherited from Mutant::CLI::Command

Mutant::CLI::Command::SUBCOMMANDS

Instance Method Summary collapse

Methods inherited from Mutant::CLI::Command

#call, command_name, #full_name, parse, short_description

Instance Method Details

#actionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/mutant/cli/command/session.rb', line 39

def action
  path = resolve_session_path or return Either::Left.new('No sessions found')

  return Either::Left.new("Session file not found: #{path}") unless path.file?

  load_session_file(path).either(
    lambda { |error|
 Either::Left.new("Failed to load session: #{error}\nRun `mutant session gc` to remove incompatible sessions.")
    },
    method(:run_report)
  )
end

#display_configObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



35
36
37
# File 'lib/mutant/cli/command/session.rb', line 35

def display_config
  @display_config || Reporter::CLI::Printer::DisplayConfig::DEFAULT
end