Class: Snapshot::SimulatorLauncherConfiguration

Inherits:
Object
  • Object
show all
Defined in:
snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(snapshot_config: nil) ⇒ SimulatorLauncherConfiguration

Returns a new instance of SimulatorLauncherConfiguration.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 30

def initialize(snapshot_config: nil)
  @languages = snapshot_config[:languages]
  @devices = snapshot_config[:devices]
  @add_photos = snapshot_config[:add_photos]
  @add_videos = snapshot_config[:add_videos]
  @clean = snapshot_config[:clean]
  @erase_simulator = snapshot_config[:erase_simulator]
  @localize_simulator = snapshot_config[:localize_simulator]
  @dark_mode = snapshot_config[:dark_mode]
  @reinstall_app = snapshot_config[:reinstall_app]
  @app_identifier = snapshot_config[:app_identifier]
  @number_of_retries = snapshot_config[:number_of_retries]
  @stop_after_first_error = snapshot_config[:stop_after_first_error]
  @output_simulator_logs = snapshot_config[:output_simulator_logs]
  @output_directory = snapshot_config[:output_directory]
  @concurrent_simulators = snapshot_config[:concurrent_simulators]
  @disable_slide_to_type = snapshot_config[:disable_slide_to_type]
  @override_status_bar = snapshot_config[:override_status_bar]

  launch_arguments = Array(snapshot_config[:launch_arguments])
  # if more than 1 set of arguments, use a tuple with an index
  if launch_arguments.count == 0
    @launch_args_set = [[""]]
  elsif launch_arguments.count == 1
    @launch_args_set = [launch_arguments]
  else
    @launch_args_set = launch_arguments.map.with_index { |e, i| [i, e] }
  end
end

Instance Attribute Details

#add_photosObject

Returns the value of attribute add_photos.



6
7
8
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 6

def add_photos
  @add_photos
end

#add_videosObject

Returns the value of attribute add_videos.



7
8
9
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 7

def add_videos
  @add_videos
end

#app_identifierObject

Returns the value of attribute app_identifier.



13
14
15
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 13

def app_identifier
  @app_identifier
end

#cleanObject

Returns the value of attribute clean.



8
9
10
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 8

def clean
  @clean
end

#concurrent_simulatorsObject Also known as: concurrent_simulators?

xcode 9



27
28
29
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 27

def concurrent_simulators
  @concurrent_simulators
end

#dark_modeObject

Returns the value of attribute dark_mode.



11
12
13
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 11

def dark_mode
  @dark_mode
end

#devicesObject

Returns the value of attribute devices.



5
6
7
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 5

def devices
  @devices
end

#disable_slide_to_typeObject

Returns the value of attribute disable_slide_to_type.



14
15
16
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 14

def disable_slide_to_type
  @disable_slide_to_type
end

#erase_simulatorObject

Returns the value of attribute erase_simulator.



9
10
11
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 9

def erase_simulator
  @erase_simulator
end

#languagesObject

both



4
5
6
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 4

def languages
  @languages
end

#launch_args_setObject

runner



23
24
25
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 23

def launch_args_set
  @launch_args_set
end

#localize_simulatorObject

Returns the value of attribute localize_simulator.



10
11
12
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 10

def localize_simulator
  @localize_simulator
end

#number_of_retriesObject

xcode 8



18
19
20
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 18

def number_of_retries
  @number_of_retries
end

#output_directoryObject

Returns the value of attribute output_directory.



24
25
26
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 24

def output_directory
  @output_directory
end

#output_simulator_logsObject

Returns the value of attribute output_simulator_logs.



20
21
22
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 20

def output_simulator_logs
  @output_simulator_logs
end

#override_status_barObject

Returns the value of attribute override_status_bar.



15
16
17
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 15

def override_status_bar
  @override_status_bar
end

#reinstall_appObject

Returns the value of attribute reinstall_app.



12
13
14
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 12

def reinstall_app
  @reinstall_app
end

#stop_after_first_errorObject

Returns the value of attribute stop_after_first_error.



19
20
21
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 19

def stop_after_first_error
  @stop_after_first_error
end