Method: Peeek::CLI#initialize

Defined in:
lib/peeek/cli.rb

#initialize(input, output, argv) ⇒ CLI

Initialize the CLI object.

Parameters:

  • input (IO)

    source to input

  • output (IO)

    destination to output the execution result

  • argv (Array<String>)

    arguments that is given from command line



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

def initialize(input, output, argv)
  @input   = input
  @output  = output
  @options = Options.new(argv)
rescue Help => e
  output.puts(e.message)
  exit
end