Class: TakePictureAction
- Inherits:
-
CameraAction
- Object
- MacroObject
- Action
- CameraAction
- TakePictureAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
Category: Camera/Photo
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ TakePictureAction
constructor
A new instance of TakePictureAction.
- #to_pc ⇒ Object
- #to_s(colour: false, indent: 0) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ TakePictureAction
Returns a new instance of TakePictureAction.
271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/ruby-macrodroid/actions.rb', line 271 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
285 286 287 288 |
# File 'lib/ruby-macrodroid/actions.rb', line 285 def to_pc() camera = @h[:use_front_camera] ? :front : :back 'take_photo :' + camera.to_s end |
#to_s(colour: false, indent: 0) ⇒ Object
290 291 292 |
# File 'lib/ruby-macrodroid/actions.rb', line 290 def to_s(colour: false, indent: 0) 'Take Picture' end |