Module: Av
- Extended by:
- Av, Logger
- Included in:
- Av
- Defined in:
- lib/av.rb,
lib/av/cli.rb,
lib/av/engine.rb,
lib/av/logger.rb,
lib/av/version.rb,
lib/av/exceptions.rb,
lib/av/param_hash.rb,
lib/av/commands/base.rb,
lib/av/commands/avconv.rb,
lib/av/commands/ffmpeg.rb
Defined Under Namespace
Modules: Commands, Logger
Classes: Cli, CommandError, Engine, FilterNotImplemented, InvalidFilterParameter, InvalidInputFile, InvalidOutputFile, ParamHash, UnableToDetect
Constant Summary
collapse
- VERSION =
"0.6.0"
Instance Method Summary
collapse
Methods included from Logger
log, logger, logger=
Instance Method Details
#cli(options = {}) ⇒ Object
21
22
23
24
|
# File 'lib/av.rb', line 21
def cli(options = {})
@options = options unless options.empty?
::Av::Cli.new(options)
end
|
#options ⇒ Object
15
16
17
18
19
|
# File 'lib/av.rb', line 15
def options
@options ||= {
log: false
}
end
|
#run(line, codes = [0]) ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/av.rb', line 26
def run line, codes = [0]
::Av.log("Running command: #{line}")
begin
Cocaine::CommandLine.new(line, "", expected_outcodes: codes).run
rescue Cocaine::ExitStatusError => e
raise Av::CommandError, "error while running command #{line}: #{e}"
end
end
|