Class: TakePictureAction
- Inherits:
-
CameraAction
- Object
- MacroObject
- Action
- CameraAction
- TakePictureAction
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Camera/Photo
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ TakePictureAction
constructor
A new instance of TakePictureAction.
- #to_pc ⇒ Object
- #to_s ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ TakePictureAction
2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 |
# File 'lib/ruby-macrodroid.rb', line 2298 def initialize(h={}) = { new_path: '/storage/sdcard1/DCIM/Camera', path: '/storage/sdcard1/DCIM/Camera', show_icon: true, use_front_camera: true, flash_option: 0 } super(.merge h) end |
Instance Method Details
#to_pc ⇒ Object
2312 2313 2314 2315 |
# File 'lib/ruby-macrodroid.rb', line 2312 def to_pc() camera = @h[:use_front_camera] ? :front : :back 'take_photo :' + camera.to_s end |
#to_s ⇒ Object
2317 2318 2319 |
# File 'lib/ruby-macrodroid.rb', line 2317 def to_s() 'Take Picture' end |