Sha256: 696f28c3a0ad0952539663d478b84b56c0ad8bb5a74e952dbf268d6846ae7caf

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 Bytes

Contents

require 'media/runner/printer'

module ArgsSanitizer
  def sanitize_args(args)
    if args.count != 2
      Media::Printer.output ['Wrong number of arguments.',
                             'Correct usage: media-runner series SERIES_FOLDER_NAME EPISODE_NUMBER']
      exit 1
    else
      { series: args[0], episode: args[1] }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
media-runner-1.0.2 lib/media/runner/app/args_sanitizer.rb