Class: EasyCols::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_cols/cli.rb

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



10
11
12
13
# File 'lib/easy_cols/cli.rb', line 10

def initialize
  @options = {}
  @column_selectors = []
end

Instance Method Details

#run(argv) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/easy_cols/cli.rb', line 15

def run(argv)
  parse_options(argv)
  process_input
rescue Error => e
  warn "Error: #{e.message}"
  exit 1
rescue StandardError => e
  warn "Unexpected error: #{e.message}"
  exit 1
end