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.
5 6 7 8 9 |
# File 'lib/lolcommits/capturer.rb', line 5 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.
3 4 5 |
# File 'lib/lolcommits/capturer.rb', line 3 def capture_delay @capture_delay end |
#capture_device ⇒ Object
Returns the value of attribute capture_device.
3 4 5 |
# File 'lib/lolcommits/capturer.rb', line 3 def capture_device @capture_device end |
#capture_duration ⇒ Object
Returns the value of attribute capture_duration.
3 4 5 |
# File 'lib/lolcommits/capturer.rb', line 3 def capture_duration @capture_duration end |
#capture_path ⇒ Object
Returns the value of attribute capture_path.
3 4 5 |
# File 'lib/lolcommits/capturer.rb', line 3 def capture_path @capture_path end |
Instance Method Details
#debug(message) ⇒ Object
16 17 18 |
# File 'lib/lolcommits/capturer.rb', line 16 def debug() super("#{self.class}: #{}") end |
#system_call(call_str, capture_output: false) ⇒ Object
11 12 13 14 |
# File 'lib/lolcommits/capturer.rb', line 11 def system_call(call_str, capture_output: false) debug "making system call for \n #{call_str}" capture_output ? `#{call_str}` : system(call_str) end |