Class: Cle::CLI
- Inherits:
-
Object
- Object
- Cle::CLI
- Defined in:
- lib/cle/cli.rb
Overview
Command line interface class
Class Method Summary collapse
-
.parse(arguments) ⇒ Object
Parse CLI arguments.
-
.run(arguments) ⇒ Object
Run CLI.
Class Method Details
.parse(arguments) ⇒ Object
Parse CLI arguments.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cle/cli.rb', line 17 def self.parse(arguments) # rubocop:disable Metrics/MethodLength OptionParser.new do |opts| opts. = <<~BANNER Completely clear terminal screen. Usage: cle BANNER opts.version = Cle::VERSION opts.on('-h', '--help', 'Display help.') do puts opts exit end opts.parse(arguments) end end |