Sha256: b868d5a0a260f97e4ba67e535861b5357ab46e631deca385bb3d07dd409f0f28

Contents?: true

Size: 1.08 KB

Versions: 15

Compression:

Stored size: 1.08 KB

Contents

module Appium
  module Core
    module Device
      class ScreenRecord
        #
        # @api private
        #

        attr_reader :upload_option

        METHOD = %w(POST PUT).freeze

        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
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
appium_lib_core-1.6.0 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.5.1 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.5.0 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.4.2 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.4.1 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.4.0 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.8 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.7 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.6 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.5 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.4 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.3 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.2 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.1 lib/appium_lib_core/device/screen_record.rb
appium_lib_core-1.3.0 lib/appium_lib_core/device/screen_record.rb