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 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) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ TakePictureAction
Returns a new instance of TakePictureAction.
2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 |
# File 'lib/ruby-macrodroid.rb', line 2962 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
2976 2977 2978 2979 |
# File 'lib/ruby-macrodroid.rb', line 2976 def to_pc() camera = @h[:use_front_camera] ? :front : :back 'take_photo :' + camera.to_s end |
#to_s(colour: false) ⇒ Object
2981 2982 2983 |
# File 'lib/ruby-macrodroid.rb', line 2981 def to_s(colour: false) 'Take Picture' end |