class TestDestination

Attributes

arch[RW]
name[RW]
os_version[RW]
platform[RW]

Public Instance Methods

append_value_for_key(destination, value, key) click to toggle source
# 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_string() click to toggle source
# 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) click to toggle source
# 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