Class: Pod::Generator::EmbedFrameworksScript

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/generator/embed_frameworks_script.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frameworks_by_config) ⇒ EmbedFrameworksScript

Returns a new instance of EmbedFrameworksScript

Parameters:


14
15
16
# File 'lib/cocoapods/generator/embed_frameworks_script.rb', line 14

def initialize(frameworks_by_config)
  @frameworks_by_config = frameworks_by_config
end

Instance Attribute Details

#frameworks_by_configHash{String => Array<FrameworkPaths>} (readonly)

Returns Multiple lists of frameworks per configuration.

Returns:

  • (Hash{String => Array<FrameworkPaths>})

    Multiple lists of frameworks per configuration.


9
10
11
# File 'lib/cocoapods/generator/embed_frameworks_script.rb', line 9

def frameworks_by_config
  @frameworks_by_config
end

Instance Method Details

#generateString

Returns The contents of the embed frameworks script.

Returns:

  • (String)

    The contents of the embed frameworks script.


34
35
36
# File 'lib/cocoapods/generator/embed_frameworks_script.rb', line 34

def generate
  script
end

#save_as(pathname) ⇒ void

This method returns an undefined value.

Saves the resource script to the given pathname.

Parameters:

  • pathname (Pathname)

    The path where the embed frameworks script should be saved.


25
26
27
28
29
30
# File 'lib/cocoapods/generator/embed_frameworks_script.rb', line 25

def save_as(pathname)
  pathname.open('w') do |file|
    file.puts(script)
  end
  File.chmod(0755, pathname.to_s)
end