lib/polites/cli.rb
# Invoke the program with some options.
#
# @param [Array<String>] args arguments given to the program invocation.
# @return [nil]
Invoke the program with some options.
Invoke the program with some options .
def call(args)
      filenames = option_parser.parse(args, into: @options)
      if @options[:help]
        @stdout.puts option_parser
      elsif @options[:version]
        @stdout.puts Polites::VERSION
      elsif filenames.any?
        filenames.each do |filename|
          @stdout.puts Convert.new.call(filename)
        end
      end
      nil
    end
def call ( args ) filenames = option_parser . parse ( args , into : @options ) if @options [ :help ] @stdout . puts option_parser elsif @options [ :version ] @stdout . puts Polites :: VERSION elsif filenames . any? filenames . each do | filename | @stdout . puts Convert . new . call ( filename ) end end nil end
Invoke the program with some options.
Invoke the program with some options .
None
nil
args
<not_specific>
<not_specific>
args arguments given to the program invocation.
args arguments given to the program invocation .