Class: Ffmprb::Execution
- Inherits:
-
Thor
- Object
- Thor
- Ffmprb::Execution
- Defined in:
- lib/ffmprb/execution.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#method_missing(method, *args) ⇒ Object
NOTE a hack from stackoverflow.com/a/23955971/714287.
- #process(*ios) ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
NOTE a hack from stackoverflow.com/a/23955971/714287
32 33 34 35 |
# File 'lib/ffmprb/execution.rb', line 32 def method_missing(method, *args) args = [:process, method.to_s] + args self.class.start(args) end |
Class Method Details
.exit_on_failure? ⇒ Boolean
7 |
# File 'lib/ffmprb/execution.rb', line 7 def self.exit_on_failure?; true; end |
Instance Method Details
#process(*ios) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ffmprb/execution.rb', line 16 def process(*ios) script = eval("lambda{#{STDIN.read}}") Ffmprb.log_level = if [:debug] Logger::DEBUG elsif [:verbose] Logger::INFO elsif [:quiet] Logger::ERROR else Logger::WARN end Ffmprb.process *ios, &script end |