Class: Appium::Core::Device::ScreenRecord
- Inherits:
-
Object
- Object
- Appium::Core::Device::ScreenRecord
- Defined in:
- lib/appium_lib_core/device/screen_record.rb
Constant Summary collapse
- METHOD =
%w(POST PUT).freeze
Instance Attribute Summary collapse
- #upload_option ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil) ⇒ ScreenRecord
constructor
A new instance of ScreenRecord.
Constructor Details
#initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil) ⇒ ScreenRecord
Returns a new instance of ScreenRecord.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/appium_lib_core/device/screen_record.rb', line 13 def initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil) @upload_option = if remote_path.nil? {} else raise 'method should be POST or PUT' unless METHOD.member?(method.to_s.upcase) option = {} option[:remotePath] = remote_path option[:user] = user unless user.nil? option[:pass] = pass unless pass.nil? option[:method] = method option end return if force_restart.nil? raise 'force_restart should be true or false' unless [true, false].member?(force_restart) @upload_option[:forceRestart] = force_restart end |
Instance Attribute Details
#upload_option ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/appium_lib_core/device/screen_record.rb', line 9 def upload_option @upload_option end |