class Pod::Generator::CopyResourcesScript
def initialize(resources, platform)
-
platform(Platform) -- @see platform -
resources(Array<#to_s>) -- @see resources
def initialize(resources, platform) @resources = resources @platform = platform end
def install_resources_function
-
(String)- The install resources shell function.
def install_resources_function if use_external_strings_file? INSTALL_RESOURCES_FUCTION else INSTALL_RESOURCES_FUCTION.gsub(' --reference-external-strings-file', '') end end
def save_as(pathname)
-
(void)-
Parameters:
-
pathname(Pathname) --
def save_as(pathname) pathname.open('w') do |file| file.puts(script) end File.chmod(0755, pathname.to_s) end
def script
-
(String)- The contents of the copy resources script.
def script script = install_resources_function resources.each do |resource| script += %Q[install_resource "#{resource}"\n] end script += RSYNC_CALL script end
def use_external_strings_file?
-
(Bool)- Whether the external strings file is supported by the
def use_external_strings_file? minimum_deployment_target = EXTERNAL_STRINGS_FILE_MIMINUM_DEPLOYMENT_TARGET[platform.name] platform.deployment_target >= minimum_deployment_target end