Class: Lolcommits::Capturer
- Inherits:
-
Object
- Object
- Lolcommits::Capturer
- Defined in:
- lib/lolcommits/capturer.rb
Direct Known Subclasses
CaptureFake, CaptureLinux, CaptureLinuxVideo, CaptureMac, CaptureMacVideo, CaptureWindows, CaptureWindowsVideo
Instance Attribute Summary collapse
-
#capture_delay ⇒ Object
Returns the value of attribute capture_delay.
-
#capture_device ⇒ Object
Returns the value of attribute capture_device.
-
#capture_duration ⇒ Object
Returns the value of attribute capture_duration.
-
#capture_path ⇒ Object
Returns the value of attribute capture_path.
Instance Method Summary collapse
- #debug(message) ⇒ Object
-
#initialize(attributes = {}) ⇒ Capturer
constructor
A new instance of Capturer.
- #system_call(call_str, capture_output: false) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Capturer
Returns a new instance of Capturer.
8 9 10 11 12 |
# File 'lib/lolcommits/capturer.rb', line 8 def initialize(attributes = {}) attributes.each do |attr, val| send("#{attr}=", val) end end |
Instance Attribute Details
#capture_delay ⇒ Object
Returns the value of attribute capture_delay.
5 6 7 |
# File 'lib/lolcommits/capturer.rb', line 5 def capture_delay @capture_delay end |
#capture_device ⇒ Object
Returns the value of attribute capture_device.
5 6 7 |
# File 'lib/lolcommits/capturer.rb', line 5 def capture_device @capture_device end |
#capture_duration ⇒ Object
Returns the value of attribute capture_duration.
5 6 7 |
# File 'lib/lolcommits/capturer.rb', line 5 def capture_duration @capture_duration end |
#capture_path ⇒ Object
Returns the value of attribute capture_path.
5 6 7 |
# File 'lib/lolcommits/capturer.rb', line 5 def capture_path @capture_path end |
Instance Method Details
#debug(message) ⇒ Object
19 20 21 |
# File 'lib/lolcommits/capturer.rb', line 19 def debug() super("#{self.class}: #{}") end |
#system_call(call_str, capture_output: false) ⇒ Object
14 15 16 17 |
# File 'lib/lolcommits/capturer.rb', line 14 def system_call(call_str, capture_output: false) debug "making system call for \n #{call_str}" capture_output ? `#{call_str}` : system(call_str) end |