Class: ICuke::Simulator::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/icuke/waxsim.rb

Constant Summary collapse

DEFAULT_CONFIGURATION =
'Debug'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_file, launch_options = {}) ⇒ Process

Returns a new instance of Process.



57
58
59
60
# File 'lib/icuke/waxsim.rb', line 57

def initialize(project_file, launch_options = {})
  @project_file = project_file
  @launch_options = launch_options
end

Instance Attribute Details

#launch_optionsObject (readonly)

Returns the value of attribute launch_options.



55
56
57
# File 'lib/icuke/waxsim.rb', line 55

def launch_options
  @launch_options
end

Instance Method Details

#commandObject



73
74
75
# File 'lib/icuke/waxsim.rb', line 73

def command
  ICuke::SDK.launch("#{directory}/#{target}.app", @launch_options[:platform], @launch_options[:env])
end

#setup_commandsObject



67
68
69
70
71
# File 'lib/icuke/waxsim.rb', line 67

def setup_commands
  cmds = []
  cmds << simulate_device_command if @launch_options.has_key?(:retina)
  cmds
end

#with_launch_options(options = {}) ⇒ Object

returns a new Process, treat Process as an immutable value object



63
64
65
# File 'lib/icuke/waxsim.rb', line 63

def with_launch_options(options = {})
  self.class.new(@project_file, @launch_options.deep_merge(options))
end