Class: SimLauncher::DirectClient

Inherits:
Object
  • Object
show all
Defined in:
lib/sim_launcher/direct_client.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_path, sdk, family) ⇒ DirectClient

Returns a new instance of DirectClient.



3
4
5
6
7
# File 'lib/sim_launcher/direct_client.rb', line 3

def initialize( app_path, sdk, family )
  @app_path = File.expand_path( app_path )
  @sdk = sdk
  @family = family
end

Class Method Details

.for_ipad_app(app_path, sdk = nil) ⇒ Object



9
10
11
# File 'lib/sim_launcher/direct_client.rb', line 9

def self.for_ipad_app( app_path, sdk = nil )
  self.new( app_path, sdk, 'ipad' )
end

.for_iphone_app(app_path, sdk = nil) ⇒ Object



13
14
15
# File 'lib/sim_launcher/direct_client.rb', line 13

def self.for_iphone_app( app_path, sdk = nil )
  self.new( app_path, sdk, 'iphone' )
end

Instance Method Details

#launchObject



17
18
19
# File 'lib/sim_launcher/direct_client.rb', line 17

def launch
  SimLauncher::Simulator.new.launch_ios_app( @app_path, @sdk, @family ) 
end

#relaunchObject



33
34
35
36
37
# File 'lib/sim_launcher/direct_client.rb', line 33

def relaunch
  simulator = SimLauncher::Simulator.new
  simulator.quit_simulator
  simulator.launch_ios_app( @app_path, @sdk, @family )
end

#rotate_leftObject



21
22
23
24
# File 'lib/sim_launcher/direct_client.rb', line 21

def rotate_left
  simulator = SimLauncher::Simulator.new
  simulator.rotate_left
end

#rotate_rightObject



26
27
28
29
# File 'lib/sim_launcher/direct_client.rb', line 26

def rotate_right
  simulator = SimLauncher::Simulator.new
  simulator.rotate_right
end