Class: Phare::CLI
- Inherits:
-
Object
- Object
- Phare::CLI
- Defined in:
- lib/phare/cli.rb
Instance Attribute Summary collapse
-
#suite ⇒ Object
readonly
Returns the value of attribute suite.
Instance Method Summary collapse
-
#initialize(env, argv) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(env, argv) ⇒ CLI
Returns a new instance of CLI.
6 7 8 9 10 11 |
# File 'lib/phare/cli.rb', line 6 def initialize(env, argv) @env = env @options = (argv) @suite = Phare::CheckSuite.new(@options) end |
Instance Attribute Details
#suite ⇒ Object (readonly)
Returns the value of attribute suite.
4 5 6 |
# File 'lib/phare/cli.rb', line 4 def suite @suite end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/phare/cli.rb', line 13 def run if @options[:version] Phare.puts Phare::VERSION exit 0 elsif @env['SKIP_CODE_CHECK'] || @env['SKIP_PHARE'] Phare. 'Skipping code style checking… Really? Well alright then…' exit 0 else exit run_suite end end |