Method: Xcodeproj::Config#save_as

Defined in:
lib/xcodeproj/config.rb

#save_as(pathname, prefix = nil) ⇒ void

This method returns an undefined value.

Writes the serialized representation of the internal data to the given path.

Parameters:

  • pathname (Pathname)

    The file where the data should be written to.



105
106
107
108
109
110
111
# File 'lib/xcodeproj/config.rb', line 105

def save_as(pathname, prefix = nil)
  if File.exist?(pathname)
    return if Config.new(pathname) == self
  end

  pathname.open('w') { |file| file << to_s(prefix) }
end