Class: ICuke::Simulator::Process
- Inherits:
-
Object
- Object
- ICuke::Simulator::Process
- Defined in:
- lib/icuke/waxsim.rb
Constant Summary collapse
- DEFAULT_CONFIGURATION =
'Debug'
Instance Attribute Summary collapse
-
#launch_options ⇒ Object
readonly
Returns the value of attribute launch_options.
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(project_file, launch_options = {}) ⇒ Process
constructor
A new instance of Process.
- #setup_commands ⇒ Object
-
#with_launch_options(options = {}) ⇒ Object
returns a new Process, treat Process as an immutable value object.
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, = {}) @project_file = project_file @launch_options = end |
Instance Attribute Details
#launch_options ⇒ Object (readonly)
Returns the value of attribute launch_options.
55 56 57 |
# File 'lib/icuke/waxsim.rb', line 55 def @launch_options end |
Instance Method Details
#command ⇒ Object
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_commands ⇒ Object
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 ( = {}) self.class.new(@project_file, @launch_options.deep_merge()) end |