Class: AllSeeingPi::Camera
- Inherits:
-
Object
- Object
- AllSeeingPi::Camera
- Defined in:
- lib/all_seeing_pi/camera.rb
Instance Attribute Summary collapse
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Instance Method Summary collapse
- #capture ⇒ Object
-
#initialize ⇒ Camera
constructor
A new instance of Camera.
Constructor Details
#initialize ⇒ Camera
Returns a new instance of Camera.
5 6 7 8 |
# File 'lib/all_seeing_pi/camera.rb', line 5 def initialize path = '../../../capture.sh' @script = AllSeeingPi.config[:capture_script] || File.(path, __FILE__) end |
Instance Attribute Details
#script ⇒ Object (readonly)
Returns the value of attribute script.
3 4 5 |
# File 'lib/all_seeing_pi/camera.rb', line 3 def script @script end |
Instance Method Details
#capture ⇒ Object
10 11 12 |
# File 'lib/all_seeing_pi/camera.rb', line 10 def capture `#{script}`.strip end |