module Xcodeproj::Project::Object::CaseConverter

def self.convert_to_plist(name, type = nil)

Parameters:
  • type (Symbol, Nil) --
  • name (Symbol, String) --

Returns:
  • (String) - The plist equivalent of the given Ruby name.
def self.convert_to_plist(name, type = nil)
  case name
  when :remote_global_id_string
    'remoteGlobalIDString'
  else
    if type == :lower
      cache = plist_cache[:lower] ||= {}
      cache[name] ||= name.to_s.camelize(:lower)
    else
      cache = plist_cache[:normal] ||= {}
      cache[name] ||= name.to_s.camelize
    end
  end
end

def self.convert_to_ruby(name)

Parameters:
  • name (String) --

Returns:
  • (Symbol) - The Ruby equivalent of the given plist name.
def self.convert_to_ruby(name)
  name.to_s.underscore.to_sym
end

def self.plist_cache

Other tags:
    Note: - A cache is used because this operation is performed for each

Returns:
  • (Hash) - A cache for the conversion to the Plist format.
def self.plist_cache
  @plist_cache ||= {}
end