Class: XCTasks::TestTask::Destination

Inherits:
Object
  • Object
show all
Defined in:
lib/xctasks/test_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Destination

Returns a new instance of Destination.



68
69
70
# File 'lib/xctasks/test_task.rb', line 68

def initialize(options = {})
  options.each { |k,v| self[k] = v }
end

Instance Attribute Details

#archObject

OS X attributes



60
61
62
# File 'lib/xctasks/test_task.rb', line 60

def arch
  @arch
end

#idObject

iOS keys



63
64
65
# File 'lib/xctasks/test_task.rb', line 63

def id
  @id
end

#nameObject

Common Keys



57
58
59
# File 'lib/xctasks/test_task.rb', line 57

def name
  @name
end

#osObject

iOS Simulator keys



66
67
68
# File 'lib/xctasks/test_task.rb', line 66

def os
  @os
end

#platformObject

Common Keys



57
58
59
# File 'lib/xctasks/test_task.rb', line 57

def platform
  @platform
end

Instance Method Details

#[](key) ⇒ Object



79
80
81
# File 'lib/xctasks/test_task.rb', line 79

def [](key)
  send(key)
end

#[]=(key, value) ⇒ Object



83
84
85
# File 'lib/xctasks/test_task.rb', line 83

def []=(key, value)
  send("#{key}=", value)
end

#to_sObject



87
88
89
90
# File 'lib/xctasks/test_task.rb', line 87

def to_s
  keys = [:platform, :name, :arch, :id, :os].reject { |k| self[k].nil? }        
  keys.map { |k| "#{key_name(k)}='#{self[k].to_s}'" }.join(',')
end