Class: TestDestination

Inherits:
Object
  • Object
show all
Defined in:
lib/model/test_destination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#archObject

Returns the value of attribute arch.



9
10
11
# File 'lib/model/test_destination.rb', line 9

def arch
  @arch
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/model/test_destination.rb', line 9

def name
  @name
end

#os_versionObject

Returns the value of attribute os_version.



9
10
11
# File 'lib/model/test_destination.rb', line 9

def os_version
  @os_version
end

#platformObject

Returns the value of attribute platform.



9
10
11
# File 'lib/model/test_destination.rb', line 9

def platform
  @platform
end

Instance Method Details

#append_value_for_key(destination, value, key) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/model/test_destination.rb', line 32

def append_value_for_key(destination, value, key)
	if value
		if destination.length > 0
			destination += ','
		end
		destination += "#{key}=#{value}"
	end
	return destination
end

#build_destination_stringObject



24
25
26
27
28
29
30
31
# File 'lib/model/test_destination.rb', line 24

def build_destination_string
	destination = ''
	destination = append_value_for_key(destination, @platform, 'platform')
	destination = append_value_for_key(destination, @name, 'name')
	destination = append_value_for_key(destination, @os_version, 'OS')
	destination = append_value_for_key(destination, @arch, 'arch')
	return destination
end

#parse_setup(setup) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/model/test_destination.rb', line 10

def parse_setup(setup)
	if setup.has_key?(YAML_SETUP_DESTINATION_PLATFORM_KEY)
		@platform = setup[YAML_SETUP_DESTINATION_PLATFORM_KEY]
	end
	if setup.has_key?(YAML_SETUP_DESTINATION_NAME_KEY)
		@name = setup[YAML_SETUP_DESTINATION_NAME_KEY]
	end
	if setup.has_key?(YAML_SETUP_DESTINATION_OS_KEY)
		@os_version = setup[YAML_SETUP_DESTINATION_OS_KEY]
	end
	if setup.has_key?(YAML_SETUP_DESTINATION_ARCH_KEY)
		@arch = setup[YAML_SETUP_DESTINATION_ARCH_KEY]
	end
end