Method: XCTasks::TestTask::Configuration#destination

Defined in:
lib/xctasks/test_task.rb

#destination(specifier = {}) ⇒ Object



137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/xctasks/test_task.rb', line 137

def destination(specifier = {})
  if specifier.kind_of?(String)
    raise ArgumentError, "Cannot configure a destination via a block when a complete String specifier is provided" if block_given?
    @destinations << specifier.shellescape
  elsif specifier.kind_of?(Hash)
    destination = Destination.new(specifier)
    yield destination if block_given?
    @destinations << destination
  else
    raise ArgumentError, "Cannot configure a destination with a #{specifier}"
  end
end