Class: FFSplitter::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CLI

Returns a new instance of CLI.



14
15
16
# File 'lib/ffsplitter.rb', line 14

def initialize(argv)
  @argv = argv
end

Class Method Details

.run(argv = ARGV) ⇒ Object



10
11
12
# File 'lib/ffsplitter.rb', line 10

def self.run(argv = ARGV)
  new(argv).run
end

Instance Method Details

#runObject



18
19
20
21
22
23
24
25
# File 'lib/ffsplitter.rb', line 18

def run
  if @argv.empty?
    puts "WTF mate?"
    exit(1)
  else
    Splitter.split_via_ffmpeg(@argv[0], @argv[1])
  end
end