Class: Mutest::CLI Private

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/mutest/cli.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.

Commandline parser / runner

Constant Summary collapse

Error =

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.

Error failed when CLI argv is invalid

Class.new(RuntimeError)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arguments) ⇒ undefined

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.

Initialize object

Parameters:

  • arguments (Array<String>)


26
27
28
29
30
# File 'lib/mutest/cli.rb', line 26

def initialize(arguments)
  @config = Config::DEFAULT

  parse(arguments)
end

Instance Attribute Details

#configConfig (readonly)

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.

Config parsed from CLI

Returns:



35
36
37
# File 'lib/mutest/cli.rb', line 35

def config
  @config
end

Class Method Details

.run(arguments) ⇒ Boolean

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.

Run cli with arguments

Parameters:

  • arguments (Array<String>)

Returns:

  • (Boolean)


14
15
16
17
18
19
# File 'lib/mutest/cli.rb', line 14

def self.run(arguments)
  Runner.call(Env::Bootstrap.call(call(arguments))).success?
rescue Error => exception
  $stderr.puts(exception.message)
  false
end