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.



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
59
60
61
62
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 32

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]
  @headless = snapshot_config[:headless]
  @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]
  @override_status_bar_arguments = snapshot_config[:override_status_bar_arguments]

  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_photos ⇒ Object

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_videos ⇒ Object

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_identifier ⇒ Object

Returns the value of attribute app_identifier.



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

def app_identifier
  @app_identifier
end

#clean ⇒ Object

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_simulators ⇒ Object Also known as: concurrent_simulators?

xcode 9



29
30
31
# File 'snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb', line 29

def concurrent_simulators
  @concurrent_simulators
end

#dark_mode ⇒ Object

Returns the value of attribute dark_mode.



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

def dark_mode
  @dark_mode
end

#devices ⇒ Object

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_type ⇒ Object

Returns the value of attribute disable_slide_to_type.



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

def disable_slide_to_type
  @disable_slide_to_type
end

#erase_simulator ⇒ Object

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

#headless ⇒ Object

Returns the value of attribute headless.



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

def headless
  @headless
end

#languages ⇒ Object

both



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

def languages
  @languages
end

#launch_args_set ⇒ Object

runner



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

def launch_args_set
  @launch_args_set
end

#localize_simulator ⇒ Object

Returns the value of attribute localize_simulator.



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

def localize_simulator
  @localize_simulator
end

#number_of_retries ⇒ Object

xcode 8



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

def number_of_retries
  @number_of_retries
end

#output_directory ⇒ Object

Returns the value of attribute output_directory.



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

def output_directory
  @output_directory
end

#output_simulator_logs ⇒ Object

Returns the value of attribute output_simulator_logs.



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

def output_simulator_logs
  @output_simulator_logs
end

#override_status_bar ⇒ Object

Returns the value of attribute override_status_bar.



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

def override_status_bar
  @override_status_bar
end

#override_status_bar_arguments ⇒ Object

Returns the value of attribute override_status_bar_arguments.



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

def override_status_bar_arguments
  @override_status_bar_arguments
end

#reinstall_app ⇒ Object

Returns the value of attribute reinstall_app.



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

def reinstall_app
  @reinstall_app
end

#stop_after_first_error ⇒ Object

Returns the value of attribute stop_after_first_error.



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

def stop_after_first_error
  @stop_after_first_error
end