Class: Mutant::CLI Private
- Inherits:
-
Object
- Object
- Mutant::CLI
- Includes:
- Adamantium::Flat
- Defined in:
- lib/mutant/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
-
#config ⇒ Config
readonly
private
Config parsed from CLI.
Class Method Summary collapse
-
.run(arguments) ⇒ Boolean
private
Run cli with arguments.
Instance Method Summary collapse
-
#initialize(arguments) ⇒ undefined
constructor
private
Initialize object.
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
28 29 30 31 32 |
# File 'lib/mutant/cli.rb', line 28 def initialize(arguments) @config = Config::DEFAULT parse(arguments) end |
Instance Attribute Details
#config ⇒ Config (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
37 38 39 |
# File 'lib/mutant/cli.rb', line 37 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
16 17 18 19 20 21 |
# File 'lib/mutant/cli.rb', line 16 def self.run(arguments) Runner.call(Env::Bootstrap.call(call(arguments))).success? rescue Error => exception $stderr.puts(exception.) false end |