Class: Videoreg::Base
- Inherits:
-
Object
- Object
- Videoreg::Base
- Defined in:
- lib/videoreg/base.rb
Constant Summary collapse
- @@logger =
::Logger.new(STDOUT)
Class Method Summary collapse
Instance Method Summary collapse
- #logger ⇒ Object
- #logger=(log) ⇒ Object
-
#proc_alive?(pid) ⇒ Boolean
Check if process is alive.
-
#tpl(str) ⇒ Object
Applies current context to the templated string.
-
#which(cmd) ⇒ Object
Cross-platform way of finding an executable in the $PATH.
Class Method Details
.logger ⇒ Object
20 21 22 |
# File 'lib/videoreg/base.rb', line 20 def self.logger @@logger end |
.logger=(log) ⇒ Object
16 17 18 |
# File 'lib/videoreg/base.rb', line 16 def self.logger=(log) @@logger = log end |
Instance Method Details
#logger ⇒ Object
8 9 10 |
# File 'lib/videoreg/base.rb', line 8 def logger self.class.logger end |
#logger=(log) ⇒ Object
12 13 14 |
# File 'lib/videoreg/base.rb', line 12 def logger=(log) self.class.logger=log end |
#proc_alive?(pid) ⇒ Boolean
Check if process is alive
30 31 32 |
# File 'lib/videoreg/base.rb', line 30 def proc_alive?(pid) Videoreg::Util.proc_alive?(pid) end |
#tpl(str) ⇒ Object
Applies current context to the templated string
25 26 27 |
# File 'lib/videoreg/base.rb', line 25 def tpl(str) eval("\"#{str}\"") end |